Candidate-key
Question 1 |
Given the STUDENTS relation as shown below.
For (StudentName, StudentAge) to be the key for this instance, the value X should not be equal to
19 | |
20 | |
21 | |
22 |
Question 1 Explanation:
There is already one entry with StudentName as “Shankar” and Age as 19. So, X value should not be 19.
Question 2 |
The maximum number of superkeys for the relation schema R(E, F, G, H) with E as the key is _____.
8 | |
9 | |
10 | |
11 |
Question 2 Explanation:
Maximum no. of possible super keys for a relation with n attributes with one candidate key (only one attribute) = 2n-1
Here, n = 4.
So, the possible super keys = 24-1 = 8
The super keys are: E, EH, EG, EF, EGH, EFH, EFG, EFGH.
Here, n = 4.
So, the possible super keys = 24-1 = 8
The super keys are: E, EH, EG, EF, EGH, EFH, EFG, EFGH.