This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Closure of Attribute Sets Given a set α of attributes of R and a set of functional dependencies F, we need a way to find all of the attributes of R that are functionally determined by α . This set of attributes is called the closure of α under F and is denoted α +. Finding α + is useful because: • if α + = R, then α is a superkey for R • if we find α + for all α⊆ R, we've computed F+ (except that we'd need to use decomposition to get all of it). An algorithm for computing α +: result := α repeat temp := result for each functional dependency β → γ in F do if β ⊆ result then result := result ∪ γ until temp = result Problem: Compute the closure for relational schema R={A,B,C,D,E} A>BC CD>E B>D E>A List candidate keys of R. Solution: R={A,B,C,D,E} F, the set of functional dependencies A>BC, CD>E, B>D, E>A Compute the closure for each β in β → γ in F Closure for A Iteration result using 1 A 2 ABC A>BC 3 ABCD B>D 4 ABCDE CD>E 5 ABCDE A+ = ABCDE, Hence A is a super key Closure for CD...
View
Full
Document
This note was uploaded on 04/01/2012 for the course CSE,IT 101 taught by Professor Mirunaalini during the Spring '12 term at Indian Institute of Technology, Chennai.
 Spring '12
 Mirunaalini

Click to edit the document details