20.01.2014 Views

Master Thesis - ICS

Master Thesis - ICS

Master Thesis - ICS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computer Science Department<br />

Antonis Misargopoulos<br />

Figure 4.2: Relation<br />

Q = R * S<br />

The natural join operation can be written as<br />

R ∗ S = π R >< ],<br />

( a b −s(<br />

a))<br />

[<br />

r(<br />

a)<br />

s(<br />

b)<br />

S<br />

i j<br />

=<br />

where a and b are the attributes in relations R and S, respectively. The result relation Q is<br />

given by<br />

Q = { t | t = ( rs − s(<br />

a))<br />

∧ r ∈ R ∧ s ∈ S ∧ r(<br />

a)<br />

= s(<br />

b)}<br />

.<br />

The result of<br />

R ∗ S on the payscale attribute is the relation Q in figure 4.2.<br />

• Semi-Join<br />

In the conventional execution of the join operation, the resulting relation has all the<br />

attributes of both input relations. Sometimes it is required that only the attributes of one<br />

of the relations be present in the output relation. The semi-join operation is designed to<br />

perform such a join [109]. It has also been defined as an operation that selects a set of<br />

tuples from one relation that relate to one or more tuples in another relation. The<br />

relationship is defined by the join condition. It is equivalent to the join of the two<br />

relations followed by a project operation that results in the attributes of the second<br />

relation being dropped from the output relation. The initial join itself may be performed<br />

by any of the join techniques. The semi-join operation is written as<br />

R >p<br />

r( a)<br />

ϑs(<br />

b)<br />

S = π<br />

a<br />

[ R ><<br />

r(<br />

a)<br />

s(<br />

b)<br />

S]<br />

i ϑ<br />

,<br />

and the result relation Q is given by<br />

38

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!