Re: Inheritance in Postgresql ?

From: ABBAS SHAKEEL <shakeel(dot)abbas(dot)qau(at)gmail(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Inheritance in Postgresql ?
Date: 2009-12-16 07:01:05
Message-ID: a498e47a0912152301j49d2fac4u4224c16e8562306c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Scott

you are right . It inherits structure only and i don't know whether to call
to it an advantage or disadvantage that it query the children table as well
while select. But in case of insert and update this concepts takes a new
turn.
How inheritance effect data?
Can you please briefly compare concept of inheritance in Postgres and JAVA,
as my mind is trying to compare this with already stored concept in mind
about inheritance ;)

On Wed, Dec 16, 2009 at 11:51 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Tue, Dec 15, 2009 at 11:36 PM, ABBAS SHAKEEL
> <shakeel(dot)abbas(dot)qau(at)gmail(dot)com> wrote:
> > Hello
> > I am not an expert for database but rarely design database for Web and
> IVR
> > applications.
> > Today I wonder if there is any practical advantage of inheritance of
> Tables.
> > Lets take the same example that is commonly referred.
> >
> > CREATE TABLE cities (
> > name text,
> > population float,
> > altitude int -- in feet
> > );
> >
> > CREATE TABLE capitals (
> > state char(2)
> > ) INHERITS (cities);
> >
> > Capital table inherit attributes from Cities but no data. I am confused
> with
> > concept of inheritance in postgres.
> >
> > In These tables what i was supposing is inheritence as that in JAVA. but
> its
> > seems to be a different scene.
>
> The child table inherits structure from the parent, the parent then
> allows you to retrieve data from it and the children together.
>

--
Best Regards
Shakeel Abbas

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2009-12-16 07:15:38 Re: Inheritance in Postgresql ?
Previous Message Scott Marlowe 2009-12-16 06:51:56 Re: Inheritance in Postgresql ?