473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Wasteful fields

I have a table of countries.

I have another table whose fields contain excluded countries. The
number of countries that can be excluded is arbitrary, which means that
I have a table that looks like this:

Visitor
Excluded Country 1
Excluded Country 2
Excluded Country 3
Excluded Country 4
Excluded Country 5
....
Excluded Country 25

I'm hoping I don't have to go above 25, but that isn't unreasonable.
Also since most visitors only have one or two exclusions, there seems
to be a lot of waste, and I need a null entry in the countries table.

I would rather have a single field with an arbitrarily sized set of
countries, but I want to ensure that the countries chosen are from the
countries table. Up to now I have been using pick-lists. Any ideas
how I can create a set of countries in a single field using a
pick-list?

Cheers,
hatcat

Aug 17 '06 #1
1 1140
So, one visitor can have many exclusions?
Sounds like a one-to-many relationship.

Country table (one record for each country)
CountryID Text Name of country. Primary key.

Person table (one record for each visitor)
PersonID AutoNumber primary key
Surname Text
Firstname Text
...

PersonCountry table (one record for each exclusion for each person):
PersonID Number Relates to Person.PersonID
CountryID Text Relates to Country.CountryID

So if Fred Jones has 3 exclusions, there will be 3 records for him in this
table.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"hatcat" <gu**********@hatcat.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have a table of countries.

I have another table whose fields contain excluded countries. The
number of countries that can be excluded is arbitrary, which means that
I have a table that looks like this:

Visitor
Excluded Country 1
Excluded Country 2
Excluded Country 3
Excluded Country 4
Excluded Country 5
...
Excluded Country 25

I'm hoping I don't have to go above 25, but that isn't unreasonable.
Also since most visitors only have one or two exclusions, there seems
to be a lot of waste, and I need a null entry in the countries table.

I would rather have a single field with an arbitrarily sized set of
countries, but I want to ensure that the countries chosen are from the
countries table. Up to now I have been using pick-lists. Any ideas
how I can create a set of countries in a single field using a
pick-list?

Cheers,
hatcat

Aug 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Cowan | last post by:
Hi I am trying to create a CSV file with some fields in double quotes ("). I am not having any luck. This is what I want; "8684","COSTING","000010001","REG",X4,15.00, ,14,0,14,9,6 I am...
0
by: bill mahoney | last post by:
I have access 2k and I have 2 tables. One is a 7X6 table representing a month with zeroes padding the fields where no day exist. For example February 2003 0 0 0 0 0 0 1 2 3 4 5 6 7 ...
4
by: Melissa | last post by:
I have a frontend file named CustomerApp and backend file named CustomerData. CustomerApp is at C:\Customer Database and CustomerData is at S:\Customer Database. Could someone help me with the code...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
2
by: Darryl Kerkeslager | last post by:
As the subject above hopefully makes clear, I want to do several reports, "with lots of fields not otherwise in database". These reports also have variable-length text. I have defined the...
0
by: Proteus | last post by:
Hi, I'm using access 97 on windows 98. I have table with 162 fields in it. I need to withdraw this information in a (totals) query with 164 fields (162 "avg" fields and 2 "count" fields). When I...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
4
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
Hey, Well, I have a Problem. I have designed a table which has few fields which are being declared in the database of type .... char of length 10. and other fields with varchar 50 and...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.