• retagged by
24,391 views
39 39 votes
Consider a relation $R (A, B, C, D, E)$ with the following three functional dependencies.

$AB \rightarrow C; \; BC \rightarrow D; \; C \rightarrow E;$

The number of superkeys in the relation $R$ is ______________ .

5 Answers

Best answer
54 54 votes

Answer : 8


AB → C

BC → D

C → E

are the FDs in the question. If you observe the given FD set, A and B are Independent attributes.

$\therefore$ every key must contain A and B.

Let’s compute Keys of the relations :

$(AB)^+ = ABCDE$

Indepent Attributes form the Key, then It is unique and minimal candidate key.

 

There are 3 more attributes in the given relation, So adding them to Candidate Key results Super key.

Every attribute has two choices (either add to candidate key or left it), and there are 3 such attributes

$\therefore$ No.of super keys = 2.2.2 = 8

Note that Every candidate Key is also Super Key.

 

Alternatively you can think like, set S = {C,D,E} (which are non prime attributes) and it’s power set must contains $2^3=8$ elements

$P(S) = \{\phi, \{C\},\{D\},\{E\},\{CD\},\{CE\},\{DE\},\{CDE\}\}$

Any Subset combining with ‘AB’ will form one distinct super key.

• edited by
7 7 votes

As per the RHS, the attributes not belonging in RHS will definitely be in Candidate key. 

So, AB will be in Candidate key.

Perform closure (AB)+ = {A,B,C,D,E} 

AB is itself a Candidate Key. No other combination of size 2 or smaller exist in relation. So only 1 Candidate key

Super key is the key which can derive all attribute in a Relation. So basically Candidate key + Other attributes.

  1. Minimal Super key =  Candiate Key = AB (Size = 2)
  2. Super key size 3 = ABC, ABD, ABE
  3. Super key size 4 = ABCD,ABCE, ABDE
  4. Super key size 5 = ABCDE

 

Answer = 1 + 3 + 3 + 1 = 8

1 1 vote
Number of super keys possible = 2^ n- k where k = size of candidate key n is number of elements here AB is C.K size = 2 so 2^5-2 = 2^3 = 8 answer Fastest method
0 0 votes

Given :- R(A, B, C, D, E)

Functional Dependencies :- AB -> C; BC -> D; C -> E

To Find :- No. of Super Key

 

Step 1 :- Find Candidate Key

(AB)⁺ = {A, B, C, D, E}

∴ Candidate Key = {AB}

 

Step 2 :- Find Super Key

∵ Candidate Key = {AB}

∴ Super Key = 2³ = 8 => {AB, ABC, ABD, ABE, ABCD, ABCE, ABDE, ABCDE}

 

∴ No. of Super Keys = 8

Answer:
Position:
Show:

Related questions

38 38 votes
4 answers 4 answers
26.7k
26.7k views
Arjun asked Feb 15, 2022
26,695 views
In a relational data model, which one of the following statements is $\text{TRUE}?$A relation with only two attributes is always in $\text{BCNF}.$If all attributes of a r...
72 72 votes
8 8 answers
34.1k
34.1k views
Arjun asked Feb 15, 2022
34,138 views
Consider the relational database with the following four schemas and their respective instances.Student(sNo, sName, dNo) Dept(dNo, dName)Course(cNo, cName, dNo) Register(...
53 53 votes
6 6 answers
21.6k
21.6k views
Arjun asked Feb 15, 2022
21,598 views
Consider the following three relations in a relational database.$\text{Employee} (\underline{\text{eId}},\text{Name}), \; \text{Brand}(\underline{\text{bId}},\text{bName}...
26 26 votes
3 answers 3 answers
19.0k
19.0k views
Arjun asked Feb 15, 2022
18,955 views
Let $\textit{R}_{i}(z)$ and $\textit{W}_{i}(z)$ denote read and write operations on a data element $z$ by a transaction $\textit{T}_{i},$ respectively. Consider the sched...