Database Design for Mere Mortals™: A Hands-On Guide to Relational Database Design, Second Edition
by Michael J. Hernandez
Chapter 8
Keys are important for the following reasons:
a. They ensure that each record in a table is properly identified.
b. They help establish and enforce various types of integrity.
c. They serve to establish table relationships.
The four main types of keys are candidate, primary, foreign, and non.
The purpose of a candidate key is to uniquely identify a single instance of the table's subject.
These are the Elements of a Candidate Key:
a. It cannot be a multipart field.
b. It must contain unique values.
c. It cannot contain null values.
d. Its value is not optional in whole or in part.
e. It comprises a minimum number of fields necessary to define uniqueness.
f. Its values must uniquely and exclusively identify each record in the table. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access