Quote:
Originally Posted by turpentyne
I've broken down the various levels into individual tables, with foreign keys: table1=continents, table2=subcontinents, table3=countries and table4=districts/states/etc.
|
this sounds like a location hierarchy
for instance, a country belongs to one and only one continent, yeah?
(if you conveniently want to ignore turkey)
so if an item belongs to a country, you automatically can conclude that the item also belongs to the continent that the country belongs to
so all you have to do is link your items to table4
and of course this has to be a many-to-many relationship, so you need an items_to_table4 table
the mysql SET datatype is ~not~ what you're looking for