O'Reilly logo

SQL in a Nutshell by Kevin Kline

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Relational Model

Effective SQL programming requires that the programmer think in terms of sets of data, rather than of individual rows. The RDBS model follows a linguistic protocol to define the hierarchy of data sets within the SQL99 standard.

Figure 2.1 is a description of the SQL99 terminology used to describe the hierarchical working sets used by a relational database—clusters contain sets of catalogs; catalogs contain sets of schemas; schemas contain sets of objects, such as tables and views; and tables and views are composed of sets of records.

SQL99 Dataset hierarchy

Figure 2-1. SQL99 Dataset hierarchy

In the relational model, data is shown logically as a two-dimensional table that describes a single entity (for example, business expenses). Data in the table is displayed in columns and rows . Each column of the table describes a specific attribute of the entity. For example, in a Business_Expense table, a column called Expense_Date might show when the expense was incurred. Each record in the table describes a specific entity; in this case, everything that makes up a business expense (when it happened, how much it cost, who incurred the expense, what it was for, and so on). The specific values of each attribute are supposed to be atomic ; that is, they are supposed to contain one, and only one, value. If a table is constructed in which the intersection of a row and column can contain more than ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required