Keys in relational databases uniquely identify tuples and include:
- Super keys which uniquely identify tuples but may include unnecessary attributes. The relation Branch uses branch as a super key.
- Candidate keys which uniquely identify tuples using only necessary attributes, like branchNo and postcode in the Branch relation.
- Primary keys which are selected candidate keys like branchNo in the Branch relation. A primary key uniquely identifies tuples and cannot contain null values.
- Alternate keys which are candidate keys not selected as primary keys, like postcode in the Branch relation.
- Composite primary keys which use multiple attributes for unique identification, like Branch uses branchNo and postcode.
- Foreign keys which match the primary key of another