InterviewSolution
| 1. |
Find the candidate key of r(a,b,c,d,e,f,g,h) ,ab-c,bd-ef,ad-g,a-h |
|
Answer» this is the correct answer key Explanation: CANDIDATE KEYS A candidate key of a relation schema R is a subset X of the attributes of R with the following two properties: 1. Every attribute is functionally dependent on X, i.e., X + = all attributes of R (also DENOTED as X + = R). 2. No proper subset of X has the property (1), i.e., X is minimal with respect to the property (1). A sub-key of R: a subset of a candidate key; a super-key:aset of attributes containing a candidate key. We also use the abbreviation CK to denote "candidate key". Let R(ABCDE) be a relation schema and consider the fol- lowing functional dependencies F = {AB → E, AD → B, B → C, C → D}. SINCE (AC) + =ABCDE, A + = A, and C + = CD, we know that AC isacandidate key, both A and C are sub-keys, and ABC is a super-key. The only other candidate keys are AB and AD. Note that since nothing determines A, A is in every can- didate key. |
|