Chapter 4

Keys, Locators, and Generated Values

Abstract

Tables used logical keys to locate data as opposed to pointers and other physical devices. I discuss my classification system for keys.

Keywords

Keys

Locators

Generated values

Compound key

IDENTITY

Natural key

Artificial key

Exposed physical locator

Surrogate key

GUID

Denormalization

Donald Knuth

Key is an unfortunate term in IT. We have encryption keys, sort keys, access keys, and probably a dozen other uses for the term I cannot think of right now. Unless I explicitly say otherwise, I will mean a relational key in this book. A (relational) key is a subset of one or more columns in a table which are guaranteed unique for all possible rows. If there is more than one column in the subset, this is a compound ...

Get Joe Celko's SQL for Smarties, 5th 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.