Data scheme question
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-06-16T06:36:39Z
Indexed on
2010/06/16
6:42 UTC
Read the original article
Hit count: 270
database-design
I am designing a data model for a local city page, more like requirements for it.
So 4 tables: Country, State, City, neighbourhood.
Real life relationships is: Country owns multiple State which owns multiple cities which ows multiple neighbourhoods.
In the data model: Do we link these with FK the same way or link each with each? Like in each table there will even be a Country ID, State ID, CityID and NeighbourhoodID so each connected with each? Other wise to reach neighbourhood from country we need to join 2 other tables in between?
There are more tables I need to maintain for IP addess of cities, latitude/longitude, etc.
© Stack Overflow or respective owner