Relational Algebra The Foundation of Database Queries
Relational Algebra The Foundation of Database Queries
Foundation of Database
Queries
Relational algebra is a formal system. It manipulates relations or tables in
a database. It forms the basis for SQL. It provides operations to retrieve,
combine, and modify data. It is essential for database design and
optimization.
MC by Manideekshith CH.
Core Relational Algebra
Operations
1 Selection (Ã)
Filters rows based on a condition. Example: Ã age>30 (Employees).
2 Projection (Ã)
Selects specific columns. Example: Ã name, salary (Employees).
3 Union (*)
Combines two relations with the same schema. Example:
Customers * Suppliers.
Join
Combines related tuples.
Natural Join
Joins on attributes with the same name.
Example
Employees Departments.
Extended Relational Algebra Operations
Rename (Ã)
Renames a relation or attribute.
Aggregate Functions
Calculates summary statistics.
Benefits and Applications of Relational Algebra