14

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 very serious design flaw we discussed in other parts of this book.

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

14.1 Distance Functions

Since ...

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