473,402 Members | 2,050 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,402 software developers and data experts.

How best to set up relationship between city - county tables?

MLH
There are some 800+ cities/towns/placenames in NC
and exactly 100 counties. I would like to have tblCities
and tblCounties set up so that a city whose geographic
boundaries extend say into 3 different counties can be
accurately represented.

I was thinking tblCities related one-to-many to tblCC (or
tblCityCounty) and then tblCC related many-to-one to
tblCounties. tblCC, of course, being a junction table
between tblCities and tblCounties. All cities, of course,
have a unique name - as do all counties.

Would you recommend natural keys here or should I
number cities and counties (say with autonumber) for
some reason?
Nov 13 '05 #1
3 1389
MLH
And, one more thing...

The junction table (tblCC) would have an ID
field from both the cities and counties table.
Shoiuld I index the junction table on both of
these fields. We're not talking about many
records here, for one thing. And I don't think
I'll be sorting on any of the junction table's
fields either. So, would an index ANYWHERE
in the junction table serve no useful purpose?
Nov 13 '05 #2
Hopefully this doesn't come across as a smartass answer, but one way is
to use GetTickCount and time the two alternatives... then you can
decide for yourself.

Nov 13 '05 #3
MLH
Most certainly, it is a smart answer (dropping the "ass"). You see, I
hadn't even given any thought as to that being a primary consideration
but now that you mentioned it, I can see it could come into play. You
are suggesting, after I run the test, that if a time savings exists
between the two, that in itself is reason enough to go with the index.
Of course, the nature of the data is fairly static. No new counties
will be added. Maybe a city or two every decade - dunno. So not
much time will be wasted updating indices.
Hopefully this doesn't come across as a smartass answer, but one way is
to use GetTickCount and time the two alternatives... then you can
decide for yourself.


Nov 13 '05 #4

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

Similar topics

16
by: Jonas Smithson | last post by:
I'm going to say something now that may seem to completely contradict a previous post of mine, in which I basically said that taking a "who cares" attitude about certain browsers (because of their...
5
by: wackyphill | last post by:
If you have several entities that have many common properties but a few have a few unique fields to them how do you design your tables? DO you make a seperate table for each entity even though...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
9
by: Mike McGee | last post by:
I am new to database apps, but I am making a db with access 2002. Here is what I have and what I would like for it to do. tblCustomers = holds customer info (Name, Address, City, State, Zip,...
1
by: bigbob | last post by:
Assume you have a page that has the following three drop down lists List_Of_States (Contains 50 States) List_Of_Counties (Contains a list of counties in the selected state)...
4
by: Leon | last post by:
How do I get a table to autpmatically enter the County name in the next field when I enter the City name? ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----...
4
by: Henry Jones | last post by:
The best way to solve YOUR problem is to do the following: Fill Bathtub. Make sure your computer is powered up. Throw your computer in the TUB. Jump in.
2
by: access baby | last post by:
I have 5 tables need to create relationship Customer Table CustomerID(auto number)(primary key) Customer Name(text) Customer City(text) Customer St(txt) Customer OrderTable Customer...
2
by: cspowart | last post by:
Consider first, table "A" : Plate Make Model ===================== ABC123 Ford F150 XYZ789 Dodge 1500 IJK444 Chev Silverado Then consider, table "B";
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.