database - Given a relation with FDs, compute the closure of set of attributes -
consider relation schema
r = abcdg
following functional dependencies (fd)ab -> c c -> bc -> d acd -> d d -> eg -> c cg -> bd ce -> ag
compute closure of
bd
,ca
.
how can find them?
the closure of set of functional dependencies, f, means functional dependencies logically implied f. example, given
bc -> d
, andd -> eg
we can apply armstrong's axioms derive
d -> e
,d -> g
,bc -> e
,bc -> g
,
and on.
when you've derived every fd implied f, have closure of f respect r. in case, want derive every fd logically implied bd , ca.
as far know, every textbook on relational database theory includes 1 or more algorithms compute closure of set of functional dependencies. best bet follow 1 of algorithms in textbook, if have one.
Comments
Post a Comment