Search code examples
oracle-databaseoracle-sqldeveloperentityoracle-sql-data-modeler

Subtypes (inner entities) in Oracle SQL Developer Data Modeler


How to create subtypes in logical model using user interface in Oracle SQL Data Modeler? I have one entity which is "VEHICLE" with atributes such as: date of production etc, and I'd like to add two subtypes: "CAR" and "MOTORCYCLE". I'd like to create imitation of inheritance.

I saw many logical models with such subtypes created in SQL data modeler, but I don't know how to create this. Subtypes should look like two inner entities nested inside "VEHICLE" class with attributes that are different than basic attributes of VEHICLE.


Solution

  • When you create an entity in Datamodeler one of the attributes is "Super type". When you add the CAR entity you can specify VEHICLE as it's supertype.

    The CAR entity rectangle is then placed inside the VEHICLE rectangle.