How would one structure a database where you have City, State, and Country, and Cities sometimes have states and sometimes don’t? Would you simply put State_ID (default NULL) and Country_ID in City or is there a better way to approach it?
How would one structure a database where you have City , State , and
Share
Your approach seems spot on. If there is no enforceable hierarchy, then you’re not left with much choice.
When the real world doesn’t conform to our schema, then we’ve got no choice than to make our schema conform to the real world.