The GATE Grind

GATE 2026 CS (CS1) – Question 30

Databases · Relational Model: Relational Algebra, Tuple Calculus, SQL · 1 mark · Multiple select

Let $P, Q, R$ and $S$ be the attributes of a relation in a relational schema. Let $X \to Y$ indicate functional dependency in the context of a relational database, where $X, Y \subseteq \{P, Q, R, S\}$. Which of the following options is/are always true?

  1. If $\{P, Q\} \to \{R\}$ and $\{P\} \to \{R\}$, then $\{Q\} \to \{R\}$
  2. If $\{P, Q\} \to \{R\}$, then $\{P\} \to \{R\}$ or $\{Q\} \to \{R\}$
  3. If $\{P\} \to \{R\}$ and $\{Q\} \to \{S\}$, then $\{P, Q\} \to \{R, S\}$
  4. If $\{P\} \to \{R\}$, then $\{P, Q\} \to \{R\}$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) If $\{P\} \to \{R\}$ and $\{Q\} \to \{S\}$, then $\{P, Q\} \to \{R, S\}$; (D) If $\{P\} \to \{R\}$, then $\{P, Q\} \to \{R\}$

Explanation

Evaluating each option using Armstrong's Axioms:
- (A) False: For counterexample, let $P$ determine $R$ while $Q$ is completely independent of $R$. Then $\{P, Q\} \to R$ and $P \to R$ hold, but $Q \to R$ does not.
- (B) False: A compound determinant $\{P, Q\} \to R$ does not imply that either attribute alone determines $R$.
- (C) True: By Armstrong's Augmentation and Transitivity (Composition Rule): If $P \to R$, then $PQ \to RQ$. If $Q \to S$, then $RQ \to RS$. Transitivity yields $PQ \to RS$.
- (D) True: By Armstrong's Augmentation Axiom, if $P \to R$, adding attribute $Q$ to the determinant gives $\{P, Q\} \to R$.

Therefore, options (C) and (D) are always true.