← RGPV CS-502 DBMS December 2024 solved question paper
← RGPV CS-502 DBMS June 2026 solved question paper
← RGPV CS-502 DBMS May 2024 solved question paper
RGPV Previous Year Examination Question
B.Tech. V Semester | CS-502 (GS) | December 2024 | 2(a)
Question (restated): Compare tuple-oriented and domain-oriented relational calculus.
Answer
Relational calculus
Relational calculus is a nonprocedural query language based on first-order predicate logic. It specifies what data is required rather than the sequence of operations used to obtain it. Its two principal forms are tuple relational calculus (TRC) and domain relational calculus (DRC).
Tuple relational calculus
In TRC, variables represent complete tuples. A general expression is {t | P(t)}, where P is a predicate that must be true for a result tuple. Attributes are referenced using tuple variables, such as t.name. Predicates can contain comparisons, logical connectives and existential or universal quantifiers.
Domain relational calculus
In DRC, variables represent individual attribute values rather than complete tuples. An expression has the form {<x1, …, xn> | P(x1, …, xn)}. Each variable ranges over an attribute domain, and the predicate specifies the relationships between these values.
Worked example
Consider Student(ID, Name, Marks) containing the following illustrative records.
| ID | Name | Marks |
|---|---|---|
| 1 | Amit | 82 |
| 2 | Priya | 68 |
| 3 | Rahul | 91 |
Retrieve the names of students scoring more than 75.
TRC: { <t.Name> | Student(t) ∧ t.Marks > 75 }
DRC: { <n> | ∃i ∃m (Student(i,n,m) ∧ m > 75) }
Both expressions return Amit and Rahul. TRC binds an entire Student tuple, whereas DRC binds ID, name and marks separately.
Differences
| Basis | TRC | DRC |
|---|---|---|
| Variable | Tuple | Attribute value |
| Access | Named tuple attributes | Individual domain variables |
| Result | Tuples or projections | Ordered values |
Safety is important: unrestricted expressions may describe infinite results. Safe calculus restricts results to a finite relevant domain. Safe TRC and DRC have equivalent expressive power to relational algebra for relational queries. Both form theoretical foundations for declarative database languages.
Further reading
Silberschatz, Korth and Sudarshan, Database System Concepts; Elmasri and Navathe, Fundamentals of Database Systems.
June 2026 examination: additional answer
RGPV CS-502 (GS) | June 2026 | Q4(b) | 7 marks (inferred)
Question (restated): Discuss advantages of tuple-oriented and domain-oriented relational calculus.
Answer
Relational calculus is a declarative query formalism based on predicate logic. It specifies what result is required rather than the sequence of operations. Tuple relational calculus (TRC) uses variables representing whole tuples; domain relational calculus (DRC) uses variables representing individual attribute values.
For Student(ID, Name, Dept), a TRC expression for CSE students is {t | Student(t) ∧ t.Dept=10}. To return names, a result tuple can be constrained by an existentially quantified Student tuple. A DRC expression is {<n> | ∃i ∃d (Student(i,n,d) ∧ d=10)}. Both express the same selection and projection without prescribing a scan or index.
TRC is convenient when reasoning about records, relationships and predicates involving several attributes. DRC is useful for expressing attribute-level conditions and is related to query-by-example approaches. Both support conjunction, disjunction, negation and existential or universal quantification. Universal quantification can express students who completed every required course.
Safe or domain-independent expressions are essential: unrestricted negation can describe infinite sets outside the database. Safe relational calculus has the same expressive power as classical relational algebra. SQL is influenced by declarative calculus but includes additional features such as aggregation, ordering and nulls.
The major advantages are concise specification, mathematical foundations for correctness, and freedom for the optimizer to select efficient execution strategies. Calculus is a logical query language rather than a physical execution algorithm.
May 2024 — Q3(a)
Question (restated): Distinguish tuple-oriented and domain-oriented relational calculus.
Answer
Tuple relational calculus (TRC) uses variables representing complete tuples; domain relational calculus (DRC) uses variables representing individual attribute values. For STUDENT(Roll, Name, Marks), TRC can express qualifying tuples as {t | STUDENT(t) and t.Marks > 60}. DRC expresses names as {<n> | exists r,m (STUDENT(r,n,m) and m > 60)}. To compare identical outputs, TRC can project names from qualifying tuples. Both are declarative: they describe desired results rather than an execution algorithm. Both use predicates, logical connectives and quantifiers. Safe, domain-independent expressions have the expressive power of relational algebra under classical relational semantics. Unsafe expressions may describe infinite results, such as unrestricted complements. SQL is influenced by calculus but adds bags, NULL and aggregation, so its semantics are not identical to classical calculus.

← RGPV CS-502 DBMS December 2024 solved question paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion