Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reflexivity axiom for inferring functional dependencies

As you know, there are three Armstrong's Axioms for inferring all the functional dependencies on a relational database. (X, Y and Z are set of attributes)

  1. Reflexivity: If X ⊆ Y, then Y → X
  2. Augmentation: If X → Y, then XZ → YZ for any Z
  3. Transitivity: if X → Y and Y → Z, then X → Z

I understand the augmentation and transitivity for example if we had such schema:

SOME_SCHEMA(a, b, c, d)

with such functional dependencies:

  1. a → b
  2. b → c

By using augmentation we could get ac → bc or by using transitivity we could get a → c and much more, however I am not sure how to infer more functional dependencies using reflexivity axiom? What does it really mean that some attribute is a subset of some other attribute?

Could you show me an example using my schema or creating your own, please?

like image 973
Templar Avatar asked Oct 05 '22 06:10

Templar


1 Answers

The transitivty rule can be also stated like this:

A1, A2, …, An → Ai

Where i is any number between 1 and n. I think this definition of the rule is a bit clearer. A1 is a subset of A1 through An, and thus you can infer the above dependency.

These type of dependencies are called trivial dependencies. The simplest form of this is:

A → A

As you can see, A is a subset of A, therefore by the definition of reflexivity, we can infer the above dependency.

This really isn't a very useful axiom, both of the first two axioms are not very useful on their own, but are there for formality sake, so we can get to the last axiom, which is very useful.

To use your example, we could say the following. Given that we have the table:

SOME_SCHEMA(a, b, c, d)

We can infer such dependencies as:

a, b, c, d → a
a, b, c, d → a, c

And many more dependencies of the same nature.

By the way, here are some good slides that explain functional dependencies in general really well. There a few slides on Armstrong's rules as well. I found these helpful when learning this stuff: Functional Dependency Slides

like image 124
lbrendanl Avatar answered Oct 10 '22 01:10

lbrendanl