You are on page 1of 4

ST.

XAVIERS COLLEGE
MAITIGHAR, KATHMANDU

DBMS
Theory Assignment #5
Submitted by:
Ajeet Chaulagain
012BSCIT007
Submitted to:
Er. Sanjay Kumar Yadav

Er. Anil Shah


(Lecturer)

Department of Computer Science


St. Xaviers College, Maitighar

AJEET CHAULAGAIN [012BSCCSIT007]


THEORY ASSIGNMENT #5

DBMS

Objective: To write about the following topics


-

Trivial and non-trivial FDs, closure of a set of FDs, Attribute closure FDs, irreducible
set of FDs
Transitivity, Reflexivity and Augmentation properties of FDs

Introduction:
A dependency occurs in a database when information stored in the same database table uniquely
determines other information stored in the same table. It can also be described as a relationship
where knowing the value of one attributes (or a set of attributes) is enough to tell you the value
of another attribute (or set of attributes) in the same table.
Saying that there is a dependency between attributes in a table is the same as saying that there is
a functional dependency between those attributes. If there is a dependency in a database such that
attributes B is dependent upon attribute A, you would write this as A -> B.
For example, In a table listing employee characteristics including Social Security Number (SSN)
and name, it can be said that name is dependent upon SSN (or SSN -> name) because an
employee's name can be uniquely determined from their SSN. However, the reverse statement
(name -> SSN) is not true because more than one employee can have the same name but
different SSNs.
[1]

Trivial and Non-Trivial FDs


A trivial functional dependency occurs when you describe a functional dependency of an
attribute on a collection of attributes that includes the original attribute. For example, {A, B} ->
B is a trivial functional dependency, as is {name, SSN} -> SSN. This type of functional
dependency is called trivial because it can be derived from common sense. It is obvious that if
you already know the value of B, then the value of B can be uniquely determined by that
knowledge.

An FD is trivial if and only if the right side is a subset of the left side

{ S#, P# } S#

All other dependencies are called nontrivial

[1] [2]

AJEET CHAULAGAIN [012BSCCSIT007]


THEORY ASSIGNMENT #5

DBMS

Closure of a set of FDs:

The set of all FDs that are implied by a given set S of FDs is called the closure of S
Armstrongs axioms (see next slide) are used to infer FDs from others
Let A, B, and C be subsets of relvar R, and let AB signify the union of A and B
Reflexivity: If B is a subset of A the A B
Augmentation: If A B, then AC BC
Transitivity:If A B and B C, then A C
Self-determination: A A
Decomposition: If A BC,
then A B and A C
Union: If A B and A C, then A BC
Composition: If A B and C D,
then AC BD
[2]

Attribute closure FDs:

The set of all attributes that are implied by a given set of attributes S is called the closure
of S

A super key implies all the other attributes of a relvar

The non key attributes of a relvar represent a closure of the superkey, but not necessarily
an irreducible one

Any group of attributes for which all the other attributes represent a closure is a superkey
[2]

Irreducible set of FDs

Let S1 and S2 be two sets of FDs. If every FD implied by S1 is implied by S2, then S2 is
a cover of S1

A set S of FDs is irreducible iff:

The right side of every FD in S involves one attribute (a singleton set)

The left side is irreducible

No FD in S can be discarded without changing the closure of S


[2]

AJEET CHAULAGAIN [012BSCCSIT007]


THEORY ASSIGNMENT #5

DBMS

FUNCTIONAL DEPENDENCY INFERENCE RULES


Transitivity: If A functionally determines B and B functionally determine C then A functionally
determines C. For example:
{name, location} -> {initials} (as {name, location} functionally determines {name} and {name}
functionally determines {initials})
Reflexivity: If B is a subset of A then A functionally determines B.
For example:
{name, location} -> {name}
Augmentation: If B is a subset of A and C functionally determines D then A and C functionally
determine B and D. For example:
{name, location} and {birthdate, time} ->{name} and {age}
(as {name} is a subset of {name, location} and {birthdate, time} functionally determines {age})
[3]

Reference:
[1]functional dependencies.Internet:
http://databases.about.com/od/specificproducts/a/Database-Dependency.htm [22 Nov, 2014]
[2]functional dependencies.Internet:
http://courses.cs.vt.edu/~cs4604/Fall08/lectures/lecture11.pdf [22 Nov, 2014]
[3]Transitive, reflexivity properties of FDs. Internet: http://classeditor.sourceforge.net/docs/Databases.pdf [22 Nov, 2014]

You might also like