Skip to content

Structural entities

Julien Delplanque edited this page Feb 8, 2018 · 2 revisions

In the meta-model, a StructuralEntity represents an entity describing how data are structured in the database. The direct subclasses of StructuralEntity are:

  • Column which models a column in a table;
  • Table which models a table;
  • Type which models a data type; and
  • Constraint which models a constraint on the rows of the table on which it is applied.

The Constraint class has several subclasses:

  • PrimaryKeyConstraint which models a primary key constraint on one or many columns of a table;
  • UniqueConstraint which models an unicity constraint on one or many columns of a table;
  • ForeignKeyConstraint which models the values of one or many column(s) must match the value of one or many column(s) in another table;
  • NotNullConstraint which models the fact that the value of a column can not be null; and
  • CheckConstraint which models the constraint executing a boolean expression to accept or reject a row to insert in the table it belongs to.

Constraints are contained in a Table because such entity can not exist without the Table on which it is applied.

Clone this wiki locally