Note5-relationalAlgbra0

# Note5-relationalAlgbra0 - CSc 134 Database Management and...

This preview shows pages 1–7. Sign up to view the full content.

1 CSc 134 Database Management and File  Organization 5. Relational Algebra Ying Jin Computer Science Department California state University, Sacramento

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Relational Algebra A set of operations for the relational model.  Enable a user to specify basic retrieval  requests.  The  algebra operations  produce new  relations. The result of a retrieval is a new relation. A sequence of relational algebra operations  forms a  relational algebra expression result  a relation  represents the result of a database query.
3 Topics on relational algebra Unary Relational Operations  Select project Relational Algebra Operations From Set  Theory Union, intersection, minus Cartesian product Binary Relational Operations Join equijoin, natural join variations of join

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 The SELECT Operation σ   <selection condition>  (R) Filter - only those tuples that satisfy a  qualifying condition appear in the result. Result:  subset  of the tuples  Examples
5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 The SELECT Operation  (Cont.) Commutative σ   <cond1>  ( σ   <cond2>  (R)) =  σ   <cond2>  ( σ   <cond1>  (R)) A cascaded SELECT operation  may be  applied in any order σ <condition1> ( σ < condition2>  ( σ <condition3>  (   R))  σ <condition2>  ( σ < condition3>  ( σ < condition1>  ( R))) Cascade of SELECT operations into a single  SELECT operation σ  <cond1>  ( σ   <cond2>  (… ( σ   <condn> (R))…) = σ   <cond1>  and   <cond2>  and   and  <condn> (R)
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/23/2012 for the course CSC 134 taught by Professor Lee during the Spring '12 term at CSU Chico.

### Page1 / 29

Note5-relationalAlgbra0 - CSc 134 Database Management and...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online