Week 4 Flashcards
What is the Relational algebra
A mathematical query language that forms the basis of the SQL query language
What is the Selection operation do?
Selects a subset of rows from relation.
What is the Projection operation do?
Deletes unwanted columns from relation.
What is the Cross-product operation do
Combines two relations.
What is Set-difference operation do?
Tuples in relation 1, but not in relation 2.
What is the Union operation do?
Tuples in relation 1 and relation 2
What will the Schema of the result contain after the projection?
Projection operator eliminate duplicates.
What will the Schema of the result contain after the selection?
The selection operator, selects rows that satisfy selection condition
What will the Schema of result be after the relational algebra operation?
Result relation can be the input for another relational algebra operation
Union Example
Intersection Example
Set difference example
Cross Product example
Both S1 and R1 have a field called sid, Which may cause a conflict when referring to columns
Rename an operator by taking a relation schema and gives a new name to the schema and the columns
What would this Condition join statement equivalent to