Primary Key
source : guru99.com/dbms-keys.html
- 1 column or no column uniquely
- identify every row
- cannot accept null values
- only one primary key
- creates clustered index
- other naming:
- composite primary key
- it may or may not be part of the foreign key
- uniquely identify each record
- compound primary key
- 1 or many columns are primary key
- any part of compound key can be a foreign key
Unique key
- uniquely determines a row which isn`t primary key
- can accept one null value
- more than one unique key is possible
- Non clustered index (TR: kümelenmemiş)
Foreign Key
- Column that creates a relatıonshıp between 2 tables