Re: Inheritance a burden? - Mailing list pgsql-hackers

From Tony Reina
Subject Re: Inheritance a burden?
Date
Msg-id 5.1.1.6.0.20020722091508.009f7130@schubert.nsi.edu
Whole thread Raw
In response to Re: Inheritance a burden?  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
At 02:17 PM 7/20/02 +0900, Curt Sampson wrote:

>Have you tried it using the standard relational method of doing this?
>(I.e., you put the common fields in one table, and the extra fields in
>other tables, along with a foreign key relating the extra fields back
>to the main table.) That would more accurately replacate what you were
>doing with inheritance.
>
>I have a suspicion, in fact, that inheritance may just be syntatic sugar
>for doing this and adding a couple of views. :-)

Yes, I thought this was the case too. I haven't specifically setup foreign 
keys, but I was under the impression that the "INHERITS" command would do this.

>Anyway, it could be that by denormalizing the data (copying it to the
>other tables), you reduced the number of joins you do, and so you got a
>performance increase.

Yes, I guess this is probably the case although it speaks against 
normalizing too much. I guess too much of a good thing is bad.

-Tony



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: C vs. C++ contributions
Next
From: Richard Tucker
Date:
Subject: Re: PITR and rollback