Skip to Main Content
SQL in a Nutshell
book

SQL in a Nutshell

by Kevin Kline
December 2000
Intermediate to advanced content levelIntermediate to advanced
224 pages
9h 52m
English
O'Reilly Media, Inc.
Content preview from SQL in a Nutshell

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL in a Nutshell, 3rd Edition

SQL in a Nutshell, 3rd Edition

Kevin Kline

Publisher Resources

ISBN: 1565927443