Joe Celko's Data and Databases: Concepts in Practice
By Joe Celko
Chapter 2: Entities, Attributes, Values, and Relationships
Chapter 2: Entities, Attributes, Values, and Relationships
Perfection is finally attained not when there is no longer anything to add but when there is no longer anything to take away. ?Antoine de Saint Exupery
Overview
What primitives should we use to build a database? The smaller the set of primitives, the better a mathematician feels. A smaller set of things to do is also better for an implementor who has to turn the primitives into a real computer system. We are lucky because Dr. Codd and his relational model are about as simple as we want to get, and they are very well defined for us.
Entities, attributes, values, and relationships are the components of a relational model. They are all represented as tables made of rows, which are made of columns in SQL and the relational model, but their semantics are very different. As an aside, when I teach an SQL class, I often have to stress that a table is made of rows, and not rows and columns; rows are made of columns. Many businesspeople who are learning the relational model think that it is a kind of spreadsheet, and this is not the case. A spreadsheet is made up of rows and columns, which have equal status and meaning in that family of tools. The cells of a spreadsheet can store data or programs; a table stores only data and constraints on the data. The spreadsheet is active, and the relational table is passive.
2.1 Entities
An
Copyright Morgan Kauffmann Publishers 1999 under license agreement with Books24x7