Relational Algebra

From Wiki Notes @ WuJiewen.com, by Jiewen Wu
Revision as of 23:18, 27 January 2009 by Admin (talk | contribs) (Introduction)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SQL, a popular relational query language, is declarative in that its queries declare what information the answer should contain instead of how to compute it, as opposed to the conventional programming languages, which are procedural.

DBMS normally translates SQL queries into an intermediate language, the relational algebra (RA), before they are optimized.

Introduction

RA is based on a number of operators on relations, while a query is just an expression involving these operators. Query optimizers can take as input the algebraic expressions to prepare a query execution plan, which is hopefully more efficient for execution.