&acirc;ˆš2011-09-02-RelationalAlgebra

# &acirc;ˆš2011-09-02-RelationalAlgebra - Relational...

This preview shows pages 1–6. Sign up to view the full content.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Relational Algebra Chapter 4, Part A

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

View Full Document
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Relational Query Languages Query languages : Allow manipulation and retrieval of data from a database. Relational model supports simple, powerful QLs: Strong formal foundation based on logic. Allows for much optimization. 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.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Formal Relational Query Languages Two mathematical Query Languages form the basis for “real” languages (e.g. SQL), and for implementation: Relational Algebra : More operational , very useful for representing execution plans. Relational Calculus : Lets users describe what they want, rather than how to compute it. ( Non- operational, declarative .)

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

View Full Document
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 Preliminaries A query is applied to relation instances , and the result of a query is also a relation instance. Schemas of input relations for a query are fixed (but query will run regardless of instance!) The schema for the result of a given query is also fixed! Determined by definition of query language constructs. Positional vs. named-field notation: Positional notation easier for formal definitions, named-field notation more readable. Both used in SQL
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 5 Example Instances R1 S1 S2 “Sailors” and “Reserves” relations for our examples. We’ll use positional or

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/07/2011 for the course CS 4410 taught by Professor Vollset during the Spring '07 term at Cornell University (Engineering School).

### Page1 / 21

&acirc;ˆš2011-09-02-RelationalAlgebra - Relational...

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

View Full Document
Ask a homework question - tutors are online