Address Table
| От | Rudi Starcevic |
|---|---|
| Тема | Address Table |
| Дата | |
| Msg-id | 3EFB992F.2050503@oasis.net.au обсуждение исходный текст |
| Ответы |
Re: Address Table
Re: Address Table Re: Address Table |
| Список | pgsql-novice |
Josh, >> But if addresses are dependant on parks, you simply use ON DELETE >> CASCADE in your FK declaration, and when you delete a Park its addresses will >> be automatically deleted. I think I can only do this is I have the parks_table key in the parks_address table. One other option, as Nabil suggested, is to have the foreign key the other way round. Ie. the parks_address key in the parks_table. Using Nabil's suggestion I wouldn't be able to cascade the delete into the parks_address table. Thus leaving a lonely address. So far I think we have discussed 3 solid and sensible options which are all correct SQL possibilities. I'm just trying to get clear in my head which is the best for this senario. Thanks Rudi.
В списке pgsql-novice по дате отправления: