GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 31

GATE CSE 2022 Q31

Database Management Systems · Functional Dependencies & Keys · Full GATE CSE 2022 paper

GATE 2022, Q31 1 mark · NAT
Report issue

Functional Dependencies & Keys

Question 31, GATE 2022: For R(A,B,C,D,E), dependencies are AB→C, BC→D, C→E. How many superkeys exist?
Tap to enlarge
Answer & solution

Official answer: 8

Step through it (3 steps)

A and B never appear on a dependency’s right side, so every key and superkey must include both. AB determines C, then BC determines D, and C determines E; hence AB is a key. All superkeys are AB with any subset of {C, D, E}, giving 2³=8.

Compute (AB)+: begin {A,B}; AB→C adds C; BC→D adds D; C→E adds E. No set lacking A or B can obtain it from these FDs, proving AB is the unique minimal key. The eight superkeys are AB,ABC,ABD,ABE,ABCD,ABCE,ABDE,ABCDE.

Original paper, page 22 · Answer key