Re: Any reason not to use inheritance? - Mailing list pgsql-general

From Thomas F.O'Connell
Subject Re: Any reason not to use inheritance?
Date
Msg-id AD0FCDDD-0B79-11D9-99C2-000D93AE0944@sitening.com
Whole thread Raw
In response to Re: Any reason not to use inheritance?  (jao@geophile.com)
List pgsql-general
If the scope of your inheritance (as in, number of children you expect
per parent) is reasonably limited, this can be convenient. But if the
number of children grows large, and you discover that you need indexing
or constraints, you will need to develop triggers that can manage
everything and generally spend a bit more time on manual intervention
than if you relied on a normalized data model.

-tfo

On Sep 20, 2004, at 5:16 PM, jao@geophile.com wrote:

>> I've yet to encounter a scenario that actually required inheritance.
>> I've used it a few times, but when I have, the end result always
>> required a bit more work because of the incomplete aspects of the
>> postgres implementation (namely constraints and indexes).
>
> Could you expand on this?
>
> All indexes and constraints would be declared on the child tables.
> Nearly all table reference would be to the child tables. (So why use
> inheritance at all? If for no other reason, all the common
> columns would be declared in one place.)
>
> Jack Orenstein
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.


pgsql-general by date:

Previous
From: Kevin Barnard
Date:
Subject: Re: using database for queuing operations?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: using database for queuing operations?