...
Database-Management-System
August 29, 2024
Computer-Networks
August 29, 2024
Database-Management-System
August 29, 2024
Computer-Networks
August 29, 2024

Database-Management-System

Question 903
Let R(A,B,C,D,E,F) be a relational schema with following functional dependencies:
C->F,E->A,EC->D,A->B
Which of the following is a key for R?

A
CD
B
EC

C
AE
D
AC
Question 903 Explanation: 
To find a key for the given relational schema R(A, B, C, D, E, F) with the functional dependencies:

C -> F
E -> A
EC -> D
A -> B
We can use the closure of attributes to determine a key. A key is a set of attributes that uniquely determines all other attributes in the relation.

Let’s start with the attribute set {C, E}:

Closure({C, E}) = {C, E, F, A, B, D}

Since the closure of {C, E} contains all attributes (C, E, F, A, B, D), {C, E} is a superkey.

To check if {C, E} is a key, we need to see if it’s minimal. We can do this by removing each attribute one at a time and checking if the closure remains the same. If it does, that attribute can be removed without changing the closure.

Removing C from {C, E}:

Closure({E}) = {E, A}

The closure no longer contains all attributes (C, E, F, A, B, D), so {C, E} is minimal.

Therefore, {C, E} is a key for the given relational schema R.

Correct Answer: B
Question 903 Explanation: 
To find a key for the given relational schema R(A, B, C, D, E, F) with the functional dependencies:

C -> F
E -> A
EC -> D
A -> B
We can use the closure of attributes to determine a key. A key is a set of attributes that uniquely determines all other attributes in the relation.

Let’s start with the attribute set {C, E}:

Closure({C, E}) = {C, E, F, A, B, D}

Since the closure of {C, E} contains all attributes (C, E, F, A, B, D), {C, E} is a superkey.

To check if {C, E} is a key, we need to see if it’s minimal. We can do this by removing each attribute one at a time and checking if the closure remains the same. If it does, that attribute can be removed without changing the closure.

Removing C from {C, E}:

Closure({E}) = {E, A}

The closure no longer contains all attributes (C, E, F, A, B, D), so {C, E} is minimal.

Therefore, {C, E} is a key for the given relational schema R.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!