Data Retrieval

SQL is based on mathematical principles, specifically set theory and relational algebra. The data is stored in the database as unordered sets of data records. SQL is a set-oriented language and many of its language elements are directly related to relational algebraic terms, such as PERMUTATION, PROJECTION, RESTRICTION, and JOIN.

A set of data is represented in a DB2 database as a table or a view and is stored in a DB2 table without regard to order. To retrieve data in a particular order, an ORDER BY phrase must be added to a SELECT statement. Similarly, if the data is to be grouped, then a GROUP BY phrase must be added to the statement.

Now, let's review the DB2CERT database design defined in the previous chapter and manipulate ...

Get DB2® Universal Database for OS/390® Version 7.1 Certification Guide 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.