Database Design for Mere Mortals™: A Hands-On Guide to Relational Database Design, Second Edition
by Michael J. Hernandez
Why Keys Are Important
Keys are crucial to a table structure for the following reasons:
-
They ensure that each record in a table is precisely identified. As you already know, a table represents a singular collection of similar objects or events. (For example, a CLASSES table represents a collection of classes, not just a single class.) The complete set of records within the table constitutes the collection, and each record represents a unique instance of the table's subject within that collection. You must have some means of accurately identifying each instance, and a key is the device that allows you to do so.
-
They help establish and enforce various types of integrity. Keys are a major component of table-level integrity and relationship-level ...
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