












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Functional dependency is a constraint between attributes in a relation that determines the values of other attributes. Functional dependency concepts, including trivial and non-trivial dependencies, closure, and equivalence of functional dependency sets. It also covers key concepts, such as superkeys, primary keys, prime attributes, and non-prime attributes, using an example to illustrate the key finding algorithm.
Typology: Study notes
1 / 20
This page cannot be seen from the preview
Don't miss anything!













Trivial − If a functional dependency (FD) X → Y holds, where Y is a subset of X, then it is called a trivial FD. Trivial FDs always hold. Non-trivial − If an FD X → Y holds, where Y is not a subset of X, then it is called a non-trivial FD. Completely non-trivial − If an FD X → Y holds, where x intersect Y = Φ, it is said to be a completely non-trivial FD.
The closure of a set F of functional dependencies is the set of all functional dependencies logically implied by F. We denote the closure of F by F+
COMPUTE ATTRIBUTE CLOSURE OF EACH OF THE ATTRIBUTES
Consider a relation R with the schema R(A, B, C, D, E, F) with a set of functional dependencies F as follows; {AB → C, BC → AD, D → E, CF → B} Finding (AB)+ First, let us find (AB)+ , the closure of attribute set AB (We do not need to test all the attributes individually. Instead we can try with those attributes that are on the left hand side of any FD.) · result = AB As AD determines C, C can be included with the result. Hence, result = AB U C = ABC. According to second FD BC → AD, the attributes B and C together can identify both A and D. Hence, result = ABC U AD = ABCD · If you know D, you will know E according to third FD D → E. so, result = ABCD U E = ABCDE. · F cannot be identified by any of these FDs. And our result can include ABCDE attributes only. Hence, the solution is AB is not the key for R. The reason is, the closure of AB, i.e., (AB)+ does not include all the attributes of R in the result.
Finding (ABF)+ Then what would be the key for R? We can try all the left hand side attributes (because they are the determiners), or some of their combination. From the above example, we would get an idea to include F as one of the key attribute. So, let us try to find (ABF)+ , the closure of attribute set ABF. result = ABF · from the above example, we could say (AB)+ = ABCDE. we know C and F, then according to CF → B, we would deduce the result as ABCDEF, which includes all the attributes from R. Hence, the solution is ABF is one of the key for R. because, (ABF)+ includes all the attributes of R.
Using Attribute Closure method, Super key is {SSN,Dnumber} , Primary Key is {SSN} as it is the minimal super key Primary attributes are SSN & Dnumber , Non-Prime attributes are Ename,Bdate,Address,Dnumber
Step 3: Considering B If the set L does not produce a key for R in Step 2, then begin adding attributes, one by one, from the set denoted by B to attributes of L and compute their closure. Attributes should be added to L in turn to ensure that all candidate keys of R are found. (If L is empty, then begin by computing the closure of attributes in the set B) For every attribute A, if A is in set R, then A will not be part of any candidate key of R
R=(branch-name, branch-city, assets,customer-name, loan-number, amount) The functional dependencies for this relation schema are: R=(branch-name,customer-name,banker-name,office-number) The functional dependencies for this relation schema are: