Database Reference
In-Depth Information
An equi-join does not remove the duplicate join column in the resulting table.
You can see in above figure - TeacherID appears twice in resulting table. A natural join
removes one of these join columns. The natural join operator is a product with an
associated restrict followed by a project of one of the join columns
Syntax of Join:
JOIN <table 1> WITH <table 2><result table>
Example 15:
A natural join of Teacher with Module will produce the table R :
4.14.6 Union
Union is an operator which takes two compatible relations as input and produces one re-
lation as output. By compatible is meant that the tables have the same structure the same
columns defined on the same domains.
<table 1> UNION <table 2> <result table>
Teacher UNION Administrator R
Note that although Manoj Kumar appears in both the Teacher and Administrator table, he
only appears once in R. This is because, since R is a relation, it cannot have duplicate rows.
Search WWH ::

Custom Search