IN ORDER TO IMPLEMENT A SET OF RULES / TUTORIALOUTLET DOT COM IN ORDER TOIMPLEMENTASETOFRULES/TUTORIALOUTLET.COM | Page 31

Figure : Intersection DIFFERENCE Example Figure : DIFFERENCE CARTESIAN PRODUCT The Cartesian Product is also an operator which works on two sets. It is sometimes called the CROSS PRODUCT or CROSS JOIN. It combines the tuples of one relation with all the tuples of the other relation. CARTESIAN PRODUCT example Figure : CARTESIAN PRODUCT JOIN Operator JOIN is used to combine related tuples from two relations: In its simplest form the JOIN operator is just the cross product of the two relations. As the join becomes more complex, tuples are removed within the cross product to make the result of the join more meaningful. JOIN allows you to evaluate a join condition between the attributes of the relations on which the join is undertaken. The notation used is R JOINjoin condition S JOIN Example Figure : JOIN Natural Join Invariably the JOIN involves an equality test, and thus is often described as an equi-join. Such joins result in two attributes in the resulting relation having exactly the same value. A `natural join' will remove the duplicate attribute(s). In most systems a natural join will require that the attributes have the same name to identify the attribute(s) to be used in the join. This may require a renaming mechanism. If you do use natural joins make sure that the relations do not have two attributes with the same name by accident. OUTER JOINs Notice that much of the data is lost when applying a join to two relations. In some cases this lost data might hold useful information. An outer join retains the information that