• + 0 comments

    1️⃣ Domain Relational Calculus & Tuple Relational Calculus

    These are non-procedural query languages used in relational databases.

    Non-procedural language means: You specify what data you want, not how to get it.

    Example:

    You write a formula expressing the condition to be satisfied.

    The system figures out how to retrieve the data.

    Tuple Relational Calculus (TRC) focuses on filtering tuples (records).

    Domain Relational Calculus (DRC) focuses on individual attribute values.

    2️⃣ Relational Algebra

    This is a procedural query language.

    Procedural language means: You specify the steps of how to retrieve the data.

    It uses operations like:

    Selection (σ), Projection (π), Union (∪), Difference (-), Cartesian Product (×), Join (⨝).

    Example:

    If you want to retrieve employees from a table, you would explicitly write a sequence of relational algebra operations to get that result.

    3️⃣ Query Language

    This is a generic term (e.g., SQL is a query language).

    It can be procedural or declarative depending on the language design.

    The term is too broad and does not specifically identify a procedural language.