Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 | 

Order Rules for Inheritance

The following rules apply to inheritance. The term class is generally used to describe the inheritance relationship between classes and virtual classes in the database.

  • For an object without a superclass, attributes are defined in the same order as in the CREATE statement (an ANSI standard).
  • If there is one superclass, locally created attributes are placed after the superclass attributes. The order of the attributes inherited from the superclass follows the one defined during the superclass definition. For multiple inheritance, the order of the superclass attributes is determined by the order of the superclasses specified during the class definition.
  • If more than one superclass inherits the same class, the attribute that exists in both superclasses is inherited to the subclass only once. At this time, if a conflict occurs, the attribute of the first superclass is inherited.
  • If a name conflict occurs in more than one superclass, you can inherit only the ones you want from the superclass attributes by using the INHERIT clause in order to resolve the conflict.
  • If the name of the superclass attribute is changed by the alias option of the INHERIT clause, its position is maintained.