|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
best solution?i need a kind of "more about this area" feature on my website to set some links to articles about the same area or spots in this area, but im not sure whats the best (fastes) solution for this. "area" can be a country, a state or just a city in this case. so have a databae and a field 'location_id' (linked to location.location_id) at some tables : loc_state: -state_id -country_id -state_long (something like 'new south wales') -state_short (something like 'nsw' ) loc_city -city_id -state_id -name location -location_id -state_id -city_id so what do you think about this? is it ok or has someone a better solution? the bad thing is that i have to use mysql so i cant use views :( Why don't sou use MS SQL 2005 Express?
As for the design: a good design starts with a definition of entities and the relationships between them. Have you thought them out well? How does your model handle some 'tricky' entities? "Paris, France" "Paris, Texas" or "Paris, Texas, USA" Some modern cities are HUGE. Are your other entities related to entire cities or city districts? Street-level, even...? What exactly are you designing? ML ML wrote:
>Why don't sou use MS SQL 2005 Express? because it is a php/mysql system, other parts are already done so i cantchange now and this is a private project, so i dont cant spend $$$ for a ms sql server. >As for the design: a good design starts with a definition of entities and i cant see any problems here. if the city_id for paris=5, state_id texas=9>the relationships between them. Have you thought them out well? >How does your model handle some 'tricky' entities? >"Paris, France" >"Paris, Texas" or "Paris, Texas, USA" and country_id france=61, us=185 then i have 2 different location_ids in table location: tbl location: loc_id - country_id - state_id - city_id 1 - 61 - null - 5 2 - 185 - 9 - 5 i only assign the loc_id to other tables. >Some modern cities are HUGE. Are your other entities related to entire i add some features to a travelguide - something like "find more about this>cities or city districts? Street-level, even...? >What exactly are you designing? city/state/country", so i dont need a street-level. the website is shareyourride.net , but there is still a lot to do until everything is like i want it. |
|||||||||||||||||||||||