14-09-2012, 11:01 AM
Relational Algebra
rela Algebra.ppt (Size: 205 KB / Downloads: 27)
Introduction
Relational query languages are languages for describing queries on a relational database
Three variants Three variants
– Relational Algebra
– Relational Calculus
– SQL
Query languages V.S. programming languages
– Query languages support easy, efficient access to large data sets.
Some Facts
Introduced by Edgar 'Ted' Coddof IBM Research in 1970.
Concept of mathematical relation as the underlying basis.
The standard database model for most transactional databases today.
What is Algebra?
A language based on operators and a domain of values
Operators map values taken from the domain into other domain values
Hence, an expression involving operators and arguments produces a value in the domain
Consider arithmetic operations +, - and * over integers.
– Algebra expressions: 2+3, (46–3)+3, (7*x)+(3*x)
Relational algebra:
– Domain: the set of all relations
– Expression: referred to as a query
Relational Algebra
Domain: set of relations
Basic operators: select, project, union, set difference, Cartesian product
Derived operators: set intersection, division, join
Procedural: Relational expression specifies query by describing an algorithm for determining the result of an expression
Conclusion
Based on the concept of mathematical relation
Building block: a relation comprising of attributes within domains
Tuples + Schema = Relation