(Created page with "The primary key and the surrogate key both are unique identifiers for the entity in the modelled world or object in the database. However , they have a difference which is ba...") |
|||
Line 3: | Line 3: | ||
<tab sep=bar head=top class=diff> | <tab sep=bar head=top class=diff> | ||
− | '''Primary Key''' | + | '''Primary Key''' | '''Surrogate Key''' |
− | + | Primary Key is a constraint that ensures that the column or set of columns so designated should not have duplicate or null values . | Surrogate Key is a column or set of colums that can be declared as primary key instead of a natural or real key. | |
| | | | ||
| | | |
Latest revision as of 14:10, 1 April 2015
The primary key and the surrogate key both are unique identifiers for the entity in the modelled world or object in the database. However , they have a difference which is based on the type of the database being used.
Primary Key | Surrogate Key |
---|---|
Primary Key is a constraint that ensures that the column or set of columns so designated should not have duplicate or null values . | Surrogate Key is a column or set of colums that can be declared as primary key instead of a natural or real key. |