Re: When to use cascading deletes?
| От | Russ Brown |
|---|---|
| Тема | Re: When to use cascading deletes? |
| Дата | |
| Msg-id | 4A3164BA.2090606@gmail.com обсуждение исходный текст |
| Ответ на | Re: When to use cascading deletes? (Eric Schwarzenbach <subscriber@blackbrook.org>) |
| Список | pgsql-general |
On 06/11/2009 11:33 AM, Eric Schwarzenbach wrote: > My rule of thumb for when to use to not use cascading deletes is this: > > If the what the record represents can essentially be thought of a "part > of" what the record that it references represents, I use cascading > deletes. If what the record represents has an independent existence, > that it, it does not necessarily have the same life cycle, I prohibit > cascading. (This is more or less the distinction between composition and > aggregation in UML terms, if I remember correctly.) > > This amounts to the same advice others have already given, but in other > terms, and may be helpful if you conceive of your data this way. > > Eric "part of" is exactly the term that I was thinking of as well.
В списке pgsql-general по дате отправления: