Subtype Entity

A Subtype Entity specializes a Modeled Entity (also known as the Supertype Entity). It is used to define a data set (or subset) for a special purpose, but that can be stored in the same database table as its Supertype.

A Subtype Entity is comparable to an alias for a database table.

Characteristics

Characteristics

 

Icon:

Subtype entity icon

Object type code:

ent

Main Development Object?

No

Part of:

Supertype Entity

Contains:

Subtype Field, Relationship, Property, Code Container, Subtype Entity

Generalization:

Entity

Specializations

Compilation Output:

Specialization

Subtype Entity specializes Modeled Entity in the following ways:

  • It has a Supertype Entity as parent

  • It cannot contain its own keys

  • It inherits the definitions and child objects of its Supertype Entity, but these can be overridden locally

  • It cannot be used to generate SQL scripts

The name of a Supertype Entity cannot be the same as a Modeled Entity or other Subtype Entity. When a Subtype Entity is created, fields and relationships defined for the Supertype Entity are reproduced in the Subtype. These definitions can be overridden to suit the requirements.

A Subtype Entity can be used to:

  • Define relationships between occurrences of the same Entity

  • Define multiple relationships between the same pair of entities

  • Define a specific role

  • Define a subset of data

  • Apply a set of constraints