Skip to main content

Extended ER Features and Relational Algebra

As databases and logic grow more complex, standard ER modeling introduces specialized abstractions.

1. Generalization

Generalization is a bottom-up design process. It combines several lower-level entities that share the same attributes to produce a higher-level entity type.

  • Example: Combining Checking Account and Savings Account into a general Account parent entity.
  • It hides differences and emphasizes similarities.

2. Specialization

Specialization is a top-down process. It breaks a single higher-level entity down into sub-groupings based on distinguishing characteristics.

  • This represents an "IS-A" relationship (super class - subclass inheritance).

3. Aggregation

Aggregation is an abstraction where relationships between entities are treated as higher-level entity sets themselves. This is useful when a relationship needs to participate in another relationship.


Relational Algebra

Relational algebra provides a collection of algebraic operations that operate on relations (tables) and output structural data. It is the procedural baseline behind declarative languages like SQL.

OperationSymbolDescription
SELECTσRejects rows that do not satisfy a predicate condition.
PROJECTπExtracts specific columns from the relation.
UNIONCombines all unique rows from two compatible tables.
Set DifferenceYields rows that are in table 1 but not in table 2.
CARTESIAN PRODUCT×Creates all possible pairs (combinations) of rows from two tables.
RENAMEρAssigns a temporary name to the results of a relational algebra expression.
SET INTERSECTIONList of all rows that appear in both tables simultaneously.
JOINCombines columns from two or more tables based on a related attribute.
ASSIGNMENTStores the result in a temporary variable.