In a current database, the surrogate key can be the primary key, generated by the database management system and not derived from any application data in the database.
Approaches to generating surrogates include:
- Universally Unique Identifiers (UUIDs)
- Globally Unique Identifiers (GUIDs)
- Object Identifiers (OIDs)
- Sybase or SQL Server identity column
IDENTITY
ORIDENTITY(n,n)
- Oracle
SEQUENCE
- PostgreSQL or IBM Informix serial
- MySQL
AUTO_INCREMENT
- AutoNumber data type in Microsoft Access
AS IDENTITY GENERATED BY DEFAULT
in IBM DB2- Identity column (implemented in DDL) in Teradata
Nenhum comentário:
Postar um comentário