You are on page 1of 10

Copyright © 2004 Pearson Education, Inc.

Chapter 6

The Relational Algebra


and Relational Calculus

Copyright © 2004 Pearson Education, Inc.


Unary Relational Operations:
SELECT and PROJECT
The SELECT Operation
The PROJECT Operation
Sequences of Operations and the RENAME
Operation

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-3
Relational Algebra Operations
from Set Theory
The UNION, INTERSECTION, and
MINUS Operations
The CARTESIAN PRODUCT (or CROSS
PRODUCT) Operation

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-4
Binary Relational Operations:
JOIN and DIVISION
The JOIN Operation
The EQUIJOIN and NATURAL JOIN
Variations of JOIN
A Complete Set of Relational Algebra
Operations
The DIVISION Operation

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-5
Additional Relational
Operations
Aggregate Functions and Grouping
Recursive Closure Operations
OUTER JOIN Operations
The OUTER JOIN Operation

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-6
Examples of Queries in
Relational Algebra

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-7
The Tuple Relational Calculus
Tuple Variables and Range Relations
Expressions and Formulas in Tuple Relational
Calculus
The Existential and Universal Quantifiers
Example Queries Using the Existential Quantifier
Transforming the Universal and Existential
Quantifiers
Using the Universal Quantifier
Safe Expressions
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 6-8
The Domain Relational
Calculus

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-9
Summary

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 6-10

You might also like