DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 1
RelationalAlgebra
Chapter4,PartA
DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 2
RelationalQueryLanguages
- Querylanguages: Allowmanipulationandretrieval
- fdatafromadatabase.
- Relationalmodelsupportssimple,powerful QLs:
Strongformalfoundationbasedonlogic.
✁Allowsformuchoptimization.
- QueryLanguages!= programminglanguages!
QLs notexpectedtobe“Turingcomplete”.
✁QLs notintendedtobeusedforcomplexcalculations.
✁QLs supporteasy,efficientaccesstolargedatasets.
DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 3
FormalRelationalQueryLanguages
- TwomathematicalQueryLanguagesform
thebasisfor“real”languages(e.g.SQL),and forimplementation:
✂RelationalAlgebra:Moreoperational,veryuseful forrepresentingexecutionplans.
✂RelationalCalculus:Letsusersdescribewhatthey want,ratherthanhowtocomputeit.(Non-
- perational,declarative.)