|
Posted by BigBadDom on 12/28/06 14:43
> If a
> Location can have only one Location_Type (and/or only one Coast_Type), it
> should be:
>
> Map (*map_id*, map_name)
> Location (*location_id*, &map_id&,
> location_name,&location_type_id&,&coast_type_id&)
> Location_Type (*location_type_id*, location_type_name)
> Coast_Type (*coast_type_id*, coast_type_name)
>
> Grtz,
Thx Grtz,
Each Location can only have one of many 'Location_type_id'
However there is a further constraint where I would like the 'location_type'
and 'coast_type' to be dependant on the 'map_id' and 'location'.
thus....
'Location' entity data example...
location_id map_id location_type_id
1 1 1
2 1 1
3 1 2
4 1 2
1 2 1
2 2 2
3 2 3
'Location_type' entity data example...
location_type_id map_id location_type_desc
1 1 Water
2 1 Grass
3 1 Forest
1 2 Water
2 2 Wetland
3 2 Grass
4 2 Rock
'location_type_id' and 'map_id' would be the joint primary key for the
'Location_type' entity. And using the 'location_type_id' and 'map_id' from
the 'Location' entity I would be able to find the 'location_type_desc'
:-
Location Type for 'location 2' on 'map 1' = Water
Location Type for 'location 2' on 'map 2' = Wetland
Location Type for 'location 3' on 'map 2' = Grass
etc...
Navigation:
[Reply to this message]
|