Inheritance in Postgresql ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Can some one Please compare inheritence in JAVA and Postgresql OR make me clear about for what inheritance is introduced in Postgres.

--
Best Regards
Shakeel Abbas


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux