Relational-Database-Design-Functional-Dependency

Functional dependencies are some constraints on the set of legal relations.
The constraint is that the value for a certain set of attributes uniquely determines the value for another set of attributes. 约束条件是一组属性的值唯一确定另一组属性的值
A functional dependency is a generalization of the notion of a key. 功能依赖关系是键概念的泛化

Functional Dependency Property 功能依赖

  • is a super key for relation schema iff

  • is a condidate key for iff and for no

  • Functional dependencies can express constraints that cannot be expressed using superkeys.
    For example:

We can use functional dependency to hold

But would not expect the following to hold:

  • we can use functional dependency to specify constraints on the set of legal relations

  • Trivial
    A functional dependency is trivial if it is satisfied by all instances of a relation.
    Equivalently,
    If is trivial.
    Example:

Closure of a Set of Functional Dependencies 功能依赖的闭包

The set of all functional dependencies logically implied by is the closure of , denoted by .

is a superset of .

How to find

  • Applying Armstrong's Axioms
    1. reflexivity
      • if then
    2. augumentation
      • if then for any .
    3. transitivity
      • if and , then
  • These rules are sound and complete.

This method is also apply in Attribute Closure.

Prove Armstrong's Axioms

For Union:
If then

  1. According to augmentation
  2. According to transitivity

For Decomposition:
if , then and

  1. according to reflexivity
  2. according to reflexivity
  3. according to transitivity

For pseudotransitivity
if and then

  1. according to augmentation
  2. according to transitivity