Table inheritance

Only tables that are defined on named row types support table inheritance. Table inheritance is the property that allows a table to inherit the behavior (constraints, storage options, triggers) from the supertable above it in the table hierarchy. A table hierarchy is the relationship that you can define among tables in which subtables inherit the behavior of supertables. A table inheritance provides the following advantages:
  • It encourages modular implementation of your data model.
  • It ensures consistent reuse of schema components.
  • It allows you to construct queries whose scope can be some or all of the tables in the table hierarchy.
In a table hierarchy, a subtable automatically inherits the following properties from its supertable:
  • All constraint definitions (primary key, unique, and referential constraints)
  • Storage option
  • All triggers
  • Indexes
  • Access method