Key Name | Definition |
---|---|
Simple | A key made from only one attribute. |
Concatenated | A key made from more than one attribute joined together as a single key, such as part or whole name with a system generated number appended as often used for E-mail addresses. |
Compound | A key made from at least two attributes or simple keys, only simple keys exist in a compound key. |
Composite | A key containing at least one compound key with at least one other attribute or simple key (this is an extension of a compound key). |
Natural | A key made from data that exists outside the current database. In other words, the data is not system generated, such as a social security number imported from another system. |
Surrogate | An artificial key made from data that is system assigned or generated when another candidate key exists. Surrogate keys are usually numeric ID values and often used for performance reasons.[citation needed] |
Candidate | A key that may become the primary key. |
Primary | The key that is selected as the primary key. Only one key within an entity is selected to be the primary key. This is the key that is allowed to migrate to other entities to define the relationships that exist among the entities. When the data model is instantiated into a physical database, it is the key that the system uses the most when accessing the table, or joining the tables together when selecting data. |
Alternate | A non-primary key that can be used to identify only one row in a table. Alternate keys may be used like a primary key in a single-table select. |
Foreign | A key that has migrated to another entity. |
CREATE TABLE
SQL statement.