Home | Previous Page | Next Page   Object-Relational Databases > Understanding Type and Table Inheritance in Dynamic Server > Table Inheritance >

The Relationship Between Type and Table Hierarchies

Every table in a table hierarchy must be assigned to a named row type in a corresponding type hierarchy. Figure 31 shows an example of the relationships that can exist between a type hierarchy and table hierarchy.

Figure 31. Example of the Relationship Between Type Hierarchy and Table Hierarchy
begin figure description - Two hierarchies of three items each are shown side-by-side. One is the type hierarchy and the other is the table hierarchy. In the hierarchies parents are on top of children.  The type hierarchy is, from top to bottom: "person_t", "employee_t", and "sales_rep_t".  The table hierarchy is, from top to bottom: "person", "employee", and "sales_rep". There are two directional arrows matching each item in the type hierarchy to exactly one item in the table hierarchy. "person_t" is matched with "person". "employee_t" is matched with "employee". "sales_rep_t" is matched to "sales_rep". - end figure description

However, you can also define a type hierarchy in which the named row types do not necessarily have a one-to-one correspondence with the tables in a table hierarchy. Figure 32 shows how you might create a type hierarchy for which only some of the named row types have been assigned to tables.

Figure 32. Example of an Inheritance Hierarchy in Which Only Some Types Have Been Assigned to Tables
begin figure description - Two hierarchies are shown side-by-side. One is the type hierarchy and has 4 items in it. The other is the table hierarchy and has two items in it. In the hierarchies parents are on top of children.  The type hierarchy is, from top to bottom: "person_t", "customer_t", "retail_customer_t", and "whlsale_customer_t".  The table hierarchy is, from top to bottom: "retail_customer", and "whlsale_customer". There are two directional arrows matching the bottom two items in the type hierarchy to exactly one item in the table hierarchy. "retail_customer_t" is matched with "retail_customer". "whlsale_customer_t" is matched with "whlsale_customer". Neither "person_t" nor "customer_t" are matched with anything - end figure description
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]