chap6-the relational algebra and relational calculus

10
Copyright © 2004 Pearson Education, Inc.

Upload: nomaddarcy

Post on 12-Nov-2014

109 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chap6-The Relational Algebra and Relational Calculus

Copyright © 2004 Pearson Education, Inc.

Page 2: Chap6-The Relational Algebra and Relational Calculus

Copyright © 2004 Pearson Education, Inc.

Chapter 6

The Relational Algebra and Relational Calculus

Page 3: Chap6-The Relational Algebra and Relational Calculus

Slide 6-3Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Unary Relational Operations: SELECT and PROJECT

The SELECT OperationThe PROJECT OperationSequences of Operations and the RENAME

Operation

Page 4: Chap6-The Relational Algebra and Relational Calculus

Slide 6-4Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Relational Algebra Operations from Set Theory

The UNION, INTERSECTION, and MINUS Operations

The CARTESIAN PRODUCT (or CROSS PRODUCT) Operation

Page 5: Chap6-The Relational Algebra and Relational Calculus

Slide 6-5Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Binary Relational Operations: JOIN and DIVISION

The JOIN OperationThe EQUIJOIN and NATURAL JOIN

Variations of JOINA Complete Set of Relational Algebra

OperationsThe DIVISION Operation

Page 6: Chap6-The Relational Algebra and Relational Calculus

Slide 6-6Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Additional Relational Operations

Aggregate Functions and GroupingRecursive Closure OperationsOUTER JOIN OperationsThe OUTER JOIN Operation

Page 7: Chap6-The Relational Algebra and Relational Calculus

Slide 6-7Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Examples of Queries in Relational Algebra

Page 8: Chap6-The Relational Algebra and Relational Calculus

Slide 6-8Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

The Tuple Relational Calculus

Tuple Variables and Range RelationsExpressions and Formulas in Tuple Relational

CalculusThe Existential and Universal QuantifiersExample Queries Using the Existential QuantifierTransforming the Universal and Existential

QuantifiersUsing the Universal QuantifierSafe Expressions

Page 9: Chap6-The Relational Algebra and Relational Calculus

Slide 6-9Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

The Domain Relational Calculus

Page 10: Chap6-The Relational Algebra and Relational Calculus

Slide 6-10Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

Summary