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 ...

Get Database Design for Mere Mortals™: A Hands-On Guide to Relational Database Design, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.