CISC 332 Lecture Notes - Lecture 9: Cross Product, Foreign Key, Relational Algebra
Document Summary
R x s = match every element in r with every element in s. We want to limit this somehow, so we don"t have too much data. We can do a product, then select out the tuples where a foreign key would match. This gives us the tuples where the eids match. *there is an operator for renaming column, but she"s okay with you doing temp(e. eid, name, dept, d. eid) Cross product (x) is not terribly useful, but followed by a select it is commonly used in queries ->join. Where is the same as a select operator except it always refers to can also be represented with a theta - this join is also called a theta join. Natural join - when two columns in the tables are the same. Don"t need to write the condition in this case. This applies to all columns in the relation that have the same name.