Jump to content

A Basic Database Design Question


rakelbara

Recommended Posts

Hi I have a very basic question regarding the design of a database. I thought I knew the answer, but after seeing an online tutorial on a triple dropdown menu and the design of the demo database, I'm not so sure anymore. Ok here's the setup, there are three tables involved. First table: tblcountryFields: country_id country Second table: tblstateFields: state_id country_id state Third table: tblcityFields: cidy_id state_id city Now my question is: In table three, is it necessary to include the countryid as well? By using SQL you can query which country the city is in....or is it good design to have a reference to the country in the city table?? I hope someone can help :-)

Link to comment
Share on other sites

  • 2 weeks later...
Now my question is: In table three, is it necessary to include the countryid as well? By using SQL you can query which country the city is in....or is it good design to have a reference to the country in the city table??
I understand there is a city named Guilford in Connecticut, Indiana, Maine, Maryland, New York, Vermont, and North Carolina, and the state of New Jersey has two cities named Springfield.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...