Inheritance Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • diamond1
    New Member
    • Nov 2006
    • 7

    #1

    Inheritance Problem

    Hi
    I am using postgresql 8.1 under WinXP
    I want to ask about the inheritance strategy of the postgresql
    Is there a real redundancy of stored data or not?
    Because after I had made the inheritance, I noticed that all of the superclass attributes have been appeared in all its subclasses :eek:
    And I have only to insert the data in the last subclass then the data will be automaticlly appeared in the superclass
    So, is that a redundancy of data or not? please the answer is very important for me :confused:

    Example
    Table1-------------> Superclass
    id name
    1 abc
    2 xyz

    Table2-------------> Subclass inherits from Table1
    id name age
    1 abc 22
    2 xyz 18

    in the second table I just make 1 attribute "age"
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    Originally posted by diamond1
    Hi
    I am using postgresql 8.1 under WinXP
    I want to ask about the inheritance strategy of the postgresql
    Is there a real redundancy of stored data or not?
    ... ... ...
    No, as far as storing the actual values there's no redundancy.
    You can read more about inheritance in Postgresql here

    Comment

    Working...