Keys in ER models are transformed into constraints in a DDL model. These are the rules for key transformations into DDL constraints as follows.

  1. The Primary key of the entity in the ER model is transformed into a primary key constraint in the SQL model.
  2. The Alternative keys of the entities in the ER model are transformed into unique constraints in the SQL model.
  3. The Inversion entries of the entities in the ER model are transformed into indexes in the SQL model.
  4. If key or entry in ER model has a name (identifier tag), this information is preserved in the SQL model. The corresponding key / index will also have a name in the SQL model.

Let's review an example of key modeling, which has been described in Key modeling. After the transformation, the three entities of the ER model are transformed into the three tables of the SQL model respectively.

TBD screenshot example of key transformation results.