O'Reilly logo

Joe Celko's Data, Measurements and Standards in SQL by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Keys
Keys are fundamentally different from other attributes. They have to be “stronger” than nonkey attributes because relationships in an RDBMS depend on the keys. That strength comes from properties that we want in a key.

6.1. Uniqueness

A key by definition is unique. This is why you cannot use a person’s name for a key in any system larger than a PDA contact list. It is up to me to find some way to tell one “John Smith” from another. In the case of a PDA or cell phone, I change the name of one of them to “John Smith Jr.” or something else. In a larger database, I will need a different key.
In the old days, other data values were hashed with the name to get a unique identifier. In the case of the Internet, many Web sites use the e-mail ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required