Note5-relationalAlgbra0

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

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

View Full Document Right Arrow Icon
1 CSc 134 Database Management and File  Organization 5. Relational Algebra Ying Jin Computer Science Department California state University, Sacramento
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
5
Background image of page 5

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

View Full DocumentRight Arrow Icon
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)
Background image of page 6
Image of page 7
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 Right Arrow Icon
Ask a homework question - tutors are online