Database Reference
In-Depth Information
2
THE RELATIONAL MODEL 1:
INTRODUCTION, QBE, AND
RELATIONAL ALGEBRA
CHAPTER
LEARNING OBJECTIVES
Describe the relational model
Understand Query-By-Example (QBE)
Use criteria in QBE
Create calculated columns in QBE
Use functions in QBE
Sort data in QBE
Join tables in QBE
Update data using QBE
Understand relational algebra
INTRODUCTION
The database management approach implemented by most DBMSs is the relational model. In this chapter, you will study
the relational model and examine a method of retrieving data from relational databases, called Query-By-Example (QBE).
Finally, you will learn about relational algebra, which is one of the original ways of manipulating a relational database.
RELATIONAL DATABASES
A relational database is a collection of tables like the ones you viewed for Premiere Products in Chapter 1.
These tables also appear in Figure 2-1. You might wonder why this type of database is not called a “table”
database or something similar, if a database is nothing more than a collection of tables. Formally, these tables
are called relations, and this is where this type of database gets its name.
How does a relational database handle entities, attributes of entities, and relationships between entities?
Each entity is stored in its own table. For example, the Premiere Products database has a table for sales reps,
a table for customers, and so on. The attributes of an entity become the fields or columns in the table. In the
table for sales reps, for example, there is a column for the rep number, a column for the rep's last name, and
so on.