Lec05 - Relational Algebra Chapter 4 EECS 484 Database Management Systems Kristen LeFevre 1 Formal Query Languages Foundation for commercial query

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 1/23/11 EECS 484: Database Management Systems, Kristen LeFevre 1 Relational Algebra Chapter 4 1/23/11 EECS 484: Database Management Systems, Kristen LeFevre 2 “Formal” Query Languages Foundation for commercial query languages like SQL Two types Declarative: Relational Calculus Describe what a user wants, rather than how to compute it. Inspired SQL Procedural : Relational Algebra Operations very useful for understanding how DB executes queries. Query Languages != programming languages! QLs not expected to be “Turing complete”. QLs not intended to be used for complex calculations. QLs support easy, efficient access to large data sets. Understanding Relational Algebra and Calculus is important to understanding SQL and query processing!
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1/23/11 EECS 484: Database Management Systems, Kristen LeFevre 3 Relational Algebra Preliminaries Query: Input: Relational instances Output: Relational instances! Specified using the schema May produce different results for different instances But schema of the result is fixed Relational Algebra is “closed” 1/23/11 EECS 484: Database Management Systems, Kristen LeFevre 4 Relational Algebra Basic operations: Selection ( ) Selects a subset of rows from relation. Projection ( ) Deletes unwanted columns from relation. Cross-product ( ) Allows us to combine two relations. Set-difference ( ) Tuples in reln. 1, but not in reln. 2. Union ( ) Tuples in reln. 1 and in reln. 2. Additional operations (constructed from basic ops): Intersection, Join , Division, Renaming Not essential, but (very!) useful. Because algebra is closed, we can compose operators ! U
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2011 for the course EECS 484 taught by Professor Staff during the Winter '08 term at University of Michigan.

Page1 / 9

Lec05 - Relational Algebra Chapter 4 EECS 484 Database Management Systems Kristen LeFevre 1 Formal Query Languages Foundation for commercial query

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online