Tuesday, 1 March 2016

Database keys

Primary Key: A primary key is a unique identifier that is different for every record.

Secondary Key: When a database has a lot of primary keys, secondary keys can be used to sort through all the data easily.

Foreign Key: A foreign key is used to link and create a relationship between tables. It's a field in one table that is linked to the primary key in other tables.