quiz

Relational Calculus in DBMS

1. Who is credited with creating and introducing Tuple Calculus as part of the relational model?

  • A) Alain Pirotte
  • B) Michel Lacroix
  • C) Edgar F. Codd
  • D) Chris Date
C) Edgar F. Codd Explanation

2. In relational calculus, what does the term “atom” refer to?

  • A) A database query.
  • B) A small, indivisible part of a query expression.
  • C) A logical operator is used to combine query conditions.
  • D) Tuple in a relation
B) A small, indivisible part of a query expression. Explanation

3. Given the formula ∀ v: H ( f ) in a schema S, what does it represent?

  • A) There exists a tuple v with header H satisfying formula f
  • B) For every tuple v with header H, formula f holds true
  • C) Some tuple v with header H satisfies formula f
  • D) Only one tuple v with header H satisfies formula f
B) For every tuple v with header H, formula f holds true Explanation

4. Which of the following best describes the nature of Tuple Relational Calculus (TRC)?

  • A) Procedural
  • B) Imperative
  • C) Non-procedural
  • D) Structured
C) Non-procedural Explanation

5. Consider a set of tuples representing students and their ages. Which query correctly uses the existential quantifier?

  • A) ∀t ∈ Students (t.Age > 20)
  • B) ∃t ∈ Students (t.Age = 18)
  • C) ∀t ∈ Students (t.Age < 25)
  • D) ∃t ∈ Students (t.Age > 30)
B) ∃t ∈ Students (t.Age = 18) Explanation

6. What does the notation { T | Condition } represent in filtering tuples?

  • A) Set of all tuples that satisfy the condition
  • B) Projection of attributes T based on the condition.
  • C) Set of tuples with null values
  • D) Renaming of tuples T based on the condition.
A) Set of all tuples that satisfy the condition Explanation

7. What is the computational expressiveness of Domain Relational Calculus (DRC) equivalent to?

  • A) SQL
  • B) NoSQL
  • C) Relational Algebra
  • D) Tuple Relational Calculus (TRC)
C) Relational Algebra Explanation

8. What defines a “safe” query expression in relational calculus?

  • A) A query expression that guarantees infinite results
  • B) A query expression that generates results dependent on the database schema
  • C) A query expression that ensures consistent results regardless of the database schema
  • D) A query expression that requires explicit constraints on variable associations
C) A query expression that ensures consistent results regardless of the database schema Explanation

9. Which of the following represents a valid Domain Relational Calculus (DRC) query?

  • A) {⟨name, age⟩ | name = 'John' ∧ age = 25}
  • B) {name, age | age > 25}
  • C) {⟨name, age⟩ | Employee(name, age) ∧ age < 30}
  • D) {name, age | name = 'John' ∨ age = 25}
C) {⟨name, age⟩ | Employee(name, age) ∧ age < 30} Explanation

10. How is the notation { R| ∃T ∈ Authors(T.article=’database’ AND R.name=T.name)} interpreted in tuple range comprehension?

  • A) Returns all tuples from R without any condition
  • B) Returns tuples from R where the condition is not satisfied
  • C) Returns tuples from R where at least one tuple in Authors has the specified article and name
  • D) Returns tuples from R where all tuples in Authors satisfy the condition
C) Returns tuples from R where at least one tuple in Authors has the specified article and name Explanation