Chapter 7. Multiple Column Data Elements

THE CONCEPT OF A data element being atomic or scalar is usually taken to mean that it is represented with a single column in a table. This is not always true. A data element is atomic when it cannot be decomposed into independent, meaningful parts. Doing so would result in attribute splitting, a design flaw that we discussed in Section 1.1.11.

Consider an (x, y) coordinate system. A single x or y value identifies a line of points, while the pair has to be taken together to give you a location on the plane. It would be inconvenient to put both coordinates into one column, so we model them in two columns.

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.