Functional dependency: Difference between revisions

Content deleted Content added
No edit summary
Example: Ordered lists
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 128:
Imagine the following list of FDs. We are going to calculate a closure for A from this relationship.
 
1.# ''A'' → ''B'' <br/>
2.# ''B'' → ''C'' <br/>
3.# ''AB'' → ''D''
 
The closure would be as follows:
{{ordered list | list-style-type = lower-alpha
 
a)| A → A (by Armstrong's reflexivity) <br/>
b)| A → AB (by 1. and (a)) <br/>
c)| A → ABD (by (b), 3, and Armstrong's transitivity) <br/>
d)| A → ABCD (by (c), and 2)
}}
 
The closure is therefore A → ABCD. By calculating the closure of A, we have validated that A is also a good candidate key as its closure is every single data value in the relationship.