# 3.4 - Relational algebra is the theoretical basis for the...

This preview shows pages 1–4. Sign up to view the full content.

Relational algebra is the theoretical basis for the manipulation of tables in the relational model. It is based on several operations. Applying an operator between two relations will generate another relation or list of entity instances. We will discuss the following relational algebra operators: Select, project, …

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The first operator is UNION. It combines all the rows from two tables in a new table, excluding the duplicated rows. In order to apply UNION between the tables they must have the same attributes, and the attributes to have the same type. If two tables satisfy this condition we say that they are UNION COMPATIBLE. In this example we are combining the top two tables. The result will contain the rows from the first table to which are added the rows from the second table (if they are not duplicated).
The intersection and difference are also applicable just between two tables that are union compatible. The INTERSECTION would only keep the rows that appear in both tables. For instance, in the top intersection between two table fragments with First names the only two common first names are Jane and Jorge. The DIFFERENCE would keep all the rows in the first table that are not in the second

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

3.4 - Relational algebra is the theoretical basis for the...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online