Chapter 3: Relational Algebra and Relational Calculus

Relational Algebra is more operational and is useful for representing execution plans.

Relational Calculus is non-operational and lets the user describe what they want instead of how to compute it.

Relational Algebra

An algebra is a formal language consisting of sets and their operations.

Operations of relational algebra can be divided into two groups:

Set Operations on Relations

Fundamental Operations

To select the attributes subject and author from a Books relation we would use:

Screenshot 2024-09-04 130913.png

To select books where the subject is database and the price is 450 we would use:

Screenshot 2024-09-04 131333.png