Relational Algebra Rolf Fagerberg DM505, Spring 2006, 4th Quarter - - PowerPoint PPT Presentation

relational algebra
SMART_READER_LITE
LIVE PREVIEW

Relational Algebra Rolf Fagerberg DM505, Spring 2006, 4th Quarter - - PowerPoint PPT Presentation

Relational Algebra Rolf Fagerberg DM505, Spring 2006, 4th Quarter 1 Algebra Algebra: operands (values) and operators (ways of generating new values from old). Example: Arithmetic algebra Operands: Numbers Operators: Unary: Sign change


slide-1
SLIDE 1

Relational Algebra

Rolf Fagerberg

DM505, Spring 2006, 4th Quarter

1

slide-2
SLIDE 2

Algebra

Algebra: operands (values) and operators (ways of generating new values from old). Example: Arithmetic algebra Operands: Numbers Operators: Unary: Sign change Binary: Addition, subtraction, multiplication, division. Expressions: 4 · (−(2 · (3 + 5)) Can be viewed as expression trees.

2

slide-3
SLIDE 3

Relational algebra

Codd, 1970

Operands: Relations Operators: Unary: Selection (σ), projection (π), renam- ing (ρ) Binary: Set operations (∩, ∪, \), cross prod- uct (×), various joins (⊲ ⊳), division (/) Again: Expressions and expression trees. Query in relational model = expression of relational algebra. SQL (query part) based very much on relational algebra.

3