1.3. A Remark on Duplicate Rows

Both of Dr. Codd’s relational models do not allow duplicate rows and are based on a set theoretical model. SQL has always allowed duplicate rows and is based on a multiset or bag model.

When the question of duplicates came up in SQL committee, we decided to leave it in the Standard. The example we used internally, and which Len Gallagher used in a reply letter to Database Programming & Design magazine and David Beech used in a letter to Datamation, was a cash register receipt with multiple occurrences of cans of cat food on it. Because of this example, the literature now refers to this as the “cat food problem.”

The fundamental question is: What are you modeling in a table? Dr. Codd and Chris Date’s position is ...

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