Question Details

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

Options

A

If ({P,Q} → {R} and {P} → {R}), then {Q} → {R}

B

If {P,Q} → {R}, then ({P} → {R} or {Q} → {R})

C

If ({P} → {R} and {Q} → {S}), then {P,Q} → {R,S}

D

If {P} → {R}, then {P,Q} → {R}

Show Answer

Correct Answer :

Option A

If ({P,Q} → {R} and {P} → {R}), then {Q} → {R}

Option C

If ({P} → {R} and {Q} → {S}), then {P,Q} → {R,S}

Option C

If ({P} → {R} and {Q} → {S}), then {P,Q} → {R,S}

Option D

If {P} → {R}, then {P,Q} → {R}

Solution :

The correct options are:
1. If {P}{R} and {Q}{S}, then {P,Q}{R,S}
2. If {P}{R}, then {P,Q}{R}

Let's analyze the validity of each statement step-by-step using the standard rules of functional dependencies in relational databases, known as Armstrong's Axioms.

1. Analyzing the statement: If {P}{R} and {Q}{S}, then {P,Q}{R,S}
This is the composition rule (sometimes referred to as the additive rule), which can be derived from Armstrong's Axioms as follows:
- Given {P}{R}, we can apply the rule of augmentation by adding Q to both sides. This gives us:
{P,Q}{R,Q} (Step 1)
- Similarly, given {Q}{S}, we can apply the rule of augmentation by adding R to both sides. This gives us:
{Q,R}{S,R} (which is equivalent to {R,Q}{R,S}) (Step 2)
- Using the transitivity rule on Step 1 ({P,Q}{R,Q}) and Step 2 ({R,Q}���{R,S}), we get:
{P,Q}{R,S}
Therefore, this option is always true.

2. Analyzing the statement: If {P}{R}, then {P,Q}{R}
This is a direct application of the augmentation rule in Armstrong's Axioms:
- If we have a functional dependency XY, we can augment the left-hand side with any attribute set Z to yield XZY (or XZYZ).
- Applying this rule to {P}{R} by augmenting the left-hand side with {Q}, we obtain:
{P,Q}{R,Q}
- By decomposition (or reflectivity since {R}{R,Q}), we get:
{P,Q}{R}
Therefore, this option is also always true.

Why the other choices are incorrect / not always true:
- If {P,Q}{R}, then ({P}{R} or {Q}{R}): This is invalid. For example, if we have a relation schema with attributes P, Q, and R representing (StudentID, CourseID) → Grade, neither StudentID → Grade nor CourseID → Grade holds individually.
- If ({P,Q}{R} and {P}{R}), then {Q}{R}: This does not necessarily follow. The fact that the combination of P and Q determines R, and P alone also determines R, tells us nothing about whether Q alone can determine R. Therefore, {Q}{R} is not guaranteed.

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...