You are on page 1of 1

DATABASE KEYS

Database keys – are unique fields that are used to identify records in a table.

LIST OF DATABASE KEYS

1. CANDIDATE KEYS – are a list or group of fields that can be used to uniquely identify
records in a table. From this list, the primary key will be selected.

2. PRIMARY KEY – an index will be created when the primary key is selected; this index is
used to speed up the operations of the database. The field selected as the primary key
should have the following characteristics:
• Not allowed to be null (empty)
• It must have a unique value (should not be duplicated)
• Sorts records according to the values in the field

3. ALTERNATE / SECONDARY KEY – these are the keys (candidate) that were not selected
as the primary key.

4. FOREIGN KEY – this is a field that is a primary key in another table. The foreign key is
what is used to form the relationship between tables.

5. COMPOSITE KEY – this is a combination of fields within a table that is used to form a
unique field. This is normally done when there are no unique fields found in the table.

You might also like