|
Posted by BigBadDom on 12/28/06 13:33
Hi all,
A question on Data Modelling...
Not strictly a php question [but linked to it with MySQL] If there is a
MySQL NG out there with frequent users please point it out to me and I will
re-post there... otherwise if you can help I would appreciate it greatly...
----
Basically I am trying to design a simple database model and getting into all
kinds of bother. Please whack me with a noob stick when you feel fit :)
I have several entity's(tables) called...
Map (*map_id*, map_name)
Location (*location_id*, &map_id&, location_name)
Location_Type (*location_type_id*, &location_id&, &map_id&,
location_type_name)
Coast_Type (*coast_type_id*, &location_id&, &map_id&, coast_type_name)
[* surrounded attibutes are the entity primary key]
[& surrounded attributes are a foreign primary key]
Obviously one location relates to only one map
But the Location_Type and Coast_Type can relate to many locations on many
map. When I try to do this it causes all sorts of bother in the Location
entity. I.e. several foreign key 'map_id' attributes are created in the
Location entity.
Am I going about if the correct way?
--
Thanks,
BigBadDom
Navigation:
[Reply to this message]
|