ch06-The Relational Algebra and Calculus

Ch06-The Relational - Copyright 2007 Ramez Elmasri and Shamkant B Navathe Slide 6 1 Chapter 6 The Relational Algebra and Calculus Copyright 2007

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

View Full Document Right Arrow Icon
Slide 6- 1 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe
Background image of page 1

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

View Full DocumentRight Arrow Icon
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 6 The Relational Algebra and Calculus
Background image of page 2
Slide 6- 3 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline Relational Algebra Unary Relational Operations Relational Algebra Operations From Set Theory Binary Relational Operations Additional Relational Operations Examples of Queries in Relational Algebra Relational Calculus Tuple Relational Calculus Domain Relational Calculus Example Database Application (COMPANY) Overview of the QBE language (appendix D)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Slide 6- 4 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Relational Algebra Overview Relational algebra is the basic set of operations for the relational model These operations enable a user to specify basic retrieval requests (or queries ) The result of an operation is a new relation , which may have been formed from one or more input relations This property makes the algebra “closed” (all objects in relational algebra are relations)
Background image of page 4
Slide 6- 5 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Relational Algebra Overview (continued) The algebra operations thus produce new relations These can be further manipulated using operations of the same algebra A sequence of relational algebra operations forms a relational algebra expression The result of a relational algebra expression is also a relation that represents the result of a database query (or retrieval request)
Background image of page 5

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

View Full DocumentRight Arrow Icon
Slide 6- 6 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Brief History of Origins of Algebra Muhammad ibn Musa al-Khwarizmi (800-847 CE) wrote a book titled al-jabr about arithmetic of variables Book was translated into Latin. Its title (al-jabr) gave Algebra its name. Al-Khwarizmi called variables “shay” “Shay” is Arabic for “thing”. Spanish transliterated “shay” as “xay” (“x” was “sh” in Spain). In time this word was abbreviated as x. Where does the word Algorithm come from? Algorithm originates from “al-Khwarizmi" Reference: PBS ( http://www.pbs.org/empires/islam/innoalgebra.html )
Background image of page 6
Slide 6- 7 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Relational Algebra Overview Relational Algebra consists of several groups of operations Unary Relational Operations SELECT (symbol: σ (sigma)) PROJECT (symbol: π (pi)) RENAME (symbol: ρ (rho)) Relational Algebra Operations From Set Theory UNION ( ), INTERSECTION ( ), DIFFERENCE (or MINUS, ) CARTESIAN PRODUCT ( x ) Binary Relational Operations JOIN (several variations of JOIN exist) DIVISION Additional Relational Operations OUTER JOINS, OUTER UNION AGGREGATE FUNCTIONS (These compute summary of information: for example, SUM, COUNT, AVG, MIN, MAX)
Background image of page 7

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

View Full DocumentRight Arrow Icon
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2012 for the course CS 348 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 81

Ch06-The Relational - Copyright 2007 Ramez Elmasri and Shamkant B Navathe Slide 6 1 Chapter 6 The Relational Algebra and Calculus Copyright 2007

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

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