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

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

View Full Document Right Arrow Icon
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, …
Background image of page 1

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

View Full Document Right Arrow Icon
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).
Background image of page 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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 Right Arrow Icon
Ask a homework question - tutors are online