Relational algebra ops

# Relational algebra ops - Relational algebra operator...

• Notes
• 2

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

Relational algebra operator overview Selection The operator σ P applied to a relation returns all tuples for which the predicate (or condition ) P is true. E.g. σ Length > 150 Projection The operator π A1,A2,…,Ak applied to a relation returns a relation with only the attributes A1, A2, …, Ak. E.g. π Title, Year (Movie) Union If we have two relations R and S , then R S is the relation formed by combining all the tuples of R and S . The relations must be union-compatible : that is, They have the same schema The matching attributes must have the same domain Intersection If we have two relations R and S that are union-compatible, R ∩ S is the relation that contains all tuples in that are in both R and S. Difference If we have two relations R and S that are union-compatible, R — S is the relation that contains all tuples in R that are not in S. Cartestian Product If we have two relations

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

This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• WILLIAMSON

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern