20.01.2014 Views

Master Thesis - ICS

Master Thesis - ICS

Master Thesis - ICS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Computer Science Department<br />

Antonis Misargopoulos<br />

As such, the result of joining two relations is a subset, proper or otherwise, of the<br />

Cartesian product of the two relations. The tuples of either relation that do not participate<br />

in the join are called dangling tuples [108]. The result of joining relations R and S with n<br />

and m attributes, respectively, is a relation Q with n+m attributes. The relation Q has one<br />

tuple for each pair of tuples from R and S that satisfies the join condition. The result<br />

relation Q may then be defined as<br />

Q = { t | t = rs ∧ r ∈ R ∧ s ∈ S ∧ t(<br />

a)<br />

ϑt(<br />

b)}<br />

.<br />

The join operator is time-consuming and data-intensive operations. In the most<br />

naive implementation, each tuple in one relation must be compared to every tuple in the<br />

other relation. Therefore, the complexity of the operation for relations with n tuples each<br />

is Ο ( n<br />

2 ) . Further, the comparison of tuples requires a large number of I/O operations.<br />

Many algorithms have been devised to execute joins intending to reduce the number of<br />

comparisons, reduce the amount of I/O, or both.<br />

4.2 Types of Join<br />

Several other types of joins have been defined. Some are direct derivatives of the thetajoin;<br />

others are combinations of the theta-join and other relational operations such as<br />

projection. Some have been implemented as primitive operations in database<br />

management systems, whereas others are currently found only in the database literature.<br />

Variations of the join operation seen in database management systems and in the<br />

literature are discussed below.<br />

• Equi-Join<br />

The most commonly used theta operator is the equality operator; in these cases, the join is<br />

called an equi-join. For all other theta operators the join is called a non equi-join. The<br />

result relation Q is defined as follows:<br />

36

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

Saved successfully!

Ooh no, something went wrong!