logo
Home Handwritten Notes

Extended Relational Algebra

Engineering → Computers Science And Engineering → Data Base Management System → Relational Algebra

Complete digital notes on Extended Relational Algebra. Study this topic thoroughly with our comprehensive notes and examples.

Extended Relational Algebra

Extended Relational Algebra increases power over basic relational algebra by adding new features and capabilities.

Normal Projection only projects specific columns from a relation.

Generalized Projection

Normal Projection only projects specific columns from a relation.

Generalized Projection extends this by allowing arithmetic operations on the projected columns.

Notation:

Notation

⇒ E is any relational-algebra expression.

⇒ Each F1, F2, ..., Fn is an arithmetic expression involving constants and attributes in the schema of E.

Ex: Example_1 Ex: Example_2 Ex: Example_3

Aggregate Functions and Operations

Aggregate Functions take a collection of values and return a single value as a result. Common aggregate functions include:

⇒ avg: Average value

⇒ min: Minimum value

⇒ max: Maximum value

⇒ sum: Sum of values

⇒ count: Number of values

⇒ These operations can be applied to the entire relation or to certain groups of tuples. They ignore NULL values, except for count.

Generalized Form (g) of Aggregate Operation:  Aggregate Operation

⇒ E is any relational-algebra expression.

⇒ G1, G2, ..., Gn is a list of attributes on which to group (can be empty).

⇒ Each Fi is an aggregate function.

⇒ Each Ai is an attribute name.

example of aggregate function Ex example of aggregate function

⇒ The result of aggregation does not have a name by default. Use the rename operation to give it a name.

⇒ For convenience, we permit renaming as part of the aggregate operation using the AS keyword.

description of faastop website
logo