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