Re: Advice on Data
- From: "BigBadDom" <never.you@xxxxxxxx>
- Date: Thu, 28 Dec 2006 14:43:18 GMT
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...
.
- Follow-Ups:
- Re: Advice on Data
- From: Rik
- Re: Advice on Data
- References:
- Advice on Data
- From: BigBadDom
- Re: Advice on Data
- From: Rik
- Advice on Data
- Prev by Date: Re: Zend Certification PHP 5 : Difference between isset() and other is_*() functions
- Next by Date: Creating PDFs in PHP
- Previous by thread: Re: Advice on Data
- Next by thread: Re: Advice on Data
- Index(es):