Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



To extend class inheritance, add a super class to a class. A relationship between two classes is created when a super class is added to an existing class. Adding a super class does not mean adding a new class.






ADD super class [ user_name.]class_name [ { , [ user_name.]class_name }_ ]

[ INHERIT resolution [ {, resolution }_ ] ] [ ]


{ column_name | method_name } OF super class_name [ AS alias ]

For the first class_name, specify the name of the class where a super class is to be added. Attributes and methods of the super class can be inherited by using the syntax above.

Name conflicts can occur when adding a new super class. If a name conflict cannot be resolved by the database system, attributes or methods to inherit from the super class can be specified by using the INHERIT clause. You can use aliases to inherit all attributes or methods that cause the conflict. For more information on super class name conflicts, see the Resolving Class Conflict section.


The following is an example of creating the female_event class by inheriting the event class included in demodb.

CREATE CLASS female_event UNDER event