You are on page 1of 23

Relational Algebra and SQL CHAPTER 2

MINAKSHI GUJRAL

SELECT -> (sigma) PROJECT -> (pi) PRODUCT -> (times) JOIN -> || (bow-tie) UNION -> (cup) INTERSECTION -> (cap) DIFFERENCE -> - (minus) RENAME -> (rho)

Comparing RA and SQL Relational algebra: is closed (the result of every expression is a relation) has a rigorous foundation has simple semantics is used for reasoning, query optimisation, etc. SQL: is a superset of relational algebra has convenient formatting features, etc. provides aggregate functions has complicated semantics is an end-user language. Any relational language as powerful as relational algebra is called relationally complete. A relationally complete language can perform all basic, meaningful operations on relations. Since SQL is a superset of relational algebra, it is also relationally complete.
Although relational algebra seems powerful enough for most practical purposes, there are some simple and natural operators on relations which cannot be expressed by relational algebra. The transitive closure of a binary relation is one of them.

Webreferences:
http://www.go4expert.com/forums/showthr ead.php?t=21166 http://db.grussell.org/section010.html

You might also like