Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
692 views
in Programming by (106k points)
closed by

Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values.

F = {CH → G, A → BC, B → CFH, E → A, F → EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R.

How many candidate keys does the relation R have?


1. 3
2. 4
3. 5
4. 6

1 Answer

0 votes
by (106k points)
selected by
 
Best answer
Correct Answer - Option 2 : 4

The correct answer is “option 2”.

CONCEPT:

A set of attributes that uniquely identify tuples in a table is called the Candidate key.

It is a super key with no repeated attributes.

A table can have multiple candidate keys but only one primary key.

The primary key can be selected from the candidate keys.

Candidate keys may have multiple attributes.

A functional dependency is a relationship or dependency that exists between two attributes.

Closure means the complete set of all possible attributes that can be functionally derived from the functional dependencies.

Closure of C is denoted by C+.

EXPLANATION

According to the given dependencies,

CH → G

A → BC

B → CFH

E → A

F → EG

Since D is not part of any functional dependency so it can be a candidate key or maybe part of a candidate key.

To find more candidate keys add A, B, C, D, E, G, and H to D & find its closure:

(AD)+ = {ABCDEFGH}

(BD)+ = {ABCDEFGH}

(CD)+ = {CD}

(ED)+ = {ABCDEFGH}

(FD)+ = {ABCDEFGH}

(GD)+ = {GD}

(HD)+ = {HD}

Since AD, BD, ED and FD gives all attributes, so they are candidate keys.

Hence, the correct answer is “option 2”.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...