c Database Management Systems - Prof. Holowczak - Week 6 Database Management Systems - Prof. Holowczak

Zicklin School of Business - Baruch College
City University of New York

Database Management Systems


Week 6

What You'll Learn This Week

Elmasri/Navathe (3rd) ed. Kroenke (7th ed.) McFadden (5th ed.)
Chapter 7 Chapter 8 Handouts on relational algebra

Relational Algebra

We now turn to a more rigorous treatment of the relational model.

Set Theoretic Operations

Consider the following relations R and S
R
First Last Age
Bill Smith 22
Sally Green 28
Mary Keen 23
Tony Jones 32
S
First Last Age
Forrest Gump 36
Sally Green 28
DonJuan DeMarco 27

R S
First Last Age
Bill Smith 22
Sally Green 28
Mary Keen 23
Tony Jones 32
Forrest Gump 36
DonJuan DeMarco 27

R - S
First Last Age
Bill Smith 22
Mary Keen 23
Tony Jones 32

R S
First Last Age
Sally Green 28

Union Compatible Relations

Cartesian Product

Selection and Projection

Selection Operator

Selection Examples

Assume the following relation EMP has the following tuples:

Name Office Dept Rank
Smith 400 CS Assistant
Jones 220 Econ Adjunct
Green 160 Econ Assistant
Brown 420 CS Associate
Smith 500 Fin Associate

Projection Operator

Projection Examples

Assume the same EMP relation above is used.

Combining Selection and Projection

For Next Week


[Last Week] [Home] [Next Week]
File: week6.html Date: Wed Jan 24 10:21:06 EST 2001
All materials Copyright, 1997-2001 Richard Holowczak