You are here: Re: Advice on Data « PHP Programming Language « IT news, forums, messages
Re: Advice on Data

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация