Database Reference
In-Depth Information
4.14.7 Intersection
Intersection is fundamentally the opposite of union. Whereas union produces the combina-
tion of two sets or tables, intersection produces a result table which contains rows common
to both input tables.
Syntax of Intersection is:
<table 1> INTERSECTION <table 2><result table>
Example 17:
Lecturers INTERSECTION Administrators  R
It give us rows, those are common in lecturer and administrator tables.
4.14.8 Difference
In most operators of the relational algebra, the order of specifying input relations is insig-
nificant. A union of table 1 with table 2, for instance, is exactly the same as a union of table
2 with table 1. Using difference, in contrast, the order of specifying the input tables does
matter.
Example 18:
Teacher DIFFERENCE Administrator R
Search WWH ::




Custom Search