Share via


Thinking in Sets

Thinking in Sets is a great book by Joe Celko. This book tells us about concepts, how we need to think when we are working with databases.

Columns are not fields, rows are not records and tables are not files, hence SQL is declarative, not procedural. There is no sequential access or ordering in a table, so “first,” “next,” and “last” rows are totally meaningless.
 
He writes "One of the first things that a newbie does is use a proprietary autonumbering feature in their SQL product as a PRIMARY KEY." This is true and it violates the definition of a relational key.
 
An attribute has to belong to an entity in the real world being modelled by the RDBMS. Autonumbering does not exist in an entity in the real world being modelled by the RDBMS. Thus, it is not an attribute and cannot be in a table, by definition.
 
That’s how to think and was totally wrong before.


See Also


Other Languages

This article is also available the following languages: