We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
Continue.. S
5
* When one attribute of a relation can only take values from another
+ Referential Integrity:
attribute of the same relation or any other relation, it is called
referential integrity.
ROLLNO NAME ADDRESS PHONE —AGE_BRANCH. cone
Student 1 mam eLa—sessizust 18s
2 RAMESH GURGAON s6soaisea 188
¥ Branch 3 SUT = -ROHTAK 9756253131 20° ECE
4 Sunes neu eo
GRANCH_CODE RANCH NAME
cs compureR science
. INFORWATION TECHNOLOGY
ce ELECTRONICS AND COMMUNICATION ENGINEERING
ow CIVILENGINEERINGFunctional Dependencies
+ A functional dependency is a constraint that specifies the relationship
between two sets of attributes where one set can accurately determine
the value of other sets.
* Itis denoted as X > Y,
+ where X is a set of attributes that is capable of determining the value of
Y.
+ The attribute set on the left side of the arrow, X is called Determinant,
while on the right side, Y is called the Dependent.
Note: Functional dependencies are used to mathematically express
relations among database entities and are very important to understand
advanced concepts in Relational Database SystemExample: Valid functional dependencies
Roll_no name deptname dept building
42 abe co A4
43 par Ir 3
44 xyz co A4
45 xyz Ir 3
46 mno EC B2
47 jd ME B2
+ roll_no > { name, dept_name, dept_building },> Here, roll_no can
determine values of fields name, dept_name and dept_building, hence
a valid Functional dependencyContinue..
*roll_no > dept_name , Since, roll_no can determine whole set of
{name, dept_name, dept_building}, it can determine its subset
dept_name also.
*dept_name + dept_building , Dept_name can identify the
dept_building accurately, since departments with different
dept_name will also have a different dept_building
* More valid functional dependencies: roll_no > name, {roll_no,
name} -» {dept_name, dept_building}, etc.Invalid functional dependencies:
*name > dept_name Students with the same name can have
different dept_name, hence this is not a valid functional dependency.
+ dept_building > dept_name There can be multiple departments in
the same building, For example, in the above table departments ME
and EC are in the same building B2, hence dept_building >
dept_name is an invalid functional dependency.
* More invalid functional dependencies: name ~> roll_no, {name,
dept_name} > roll_no, dept_building > roll_no, etc.Types of Functional dependencies
1. Trivial functional dependency
2. Non-Trivial functional dependency
3. Multivalued functional dependency
4. Transitive functional dependencyContinue..
+ In Trivial Functional Dependency, a dependent is always a subset of the
determinant.
i.e. IfX-> Y and Y is the subset of X, then it is called trivial functional
dependency
+ For Example:
+ Here, {roll_no, name} > name is a trivial functional dependency, since the
dependent name is a subset of determinant set {roll_no, name}
Similarly, roll_no > roll_no is also an example of trivial functional dependency.Non-trivial Functional Dependency
* In Non-trivial functional dependency, the dependent is strictly not a
subset of the determinant.
*i.e. If X > Y and Y is not a subset of X, then it is called Non-trivial
functional dependency.
* For Example:
* Here, roll_no > name is a non-trivial functional dependency,
*since the dependent name is not a subset of determinant roll_no
Similarly, {roll_no, name} -> age is also a non-trivial functional
dependency, since age is not a subset of {roll_no, name}Multivalued Functional Dependency
* In Multivalued functional dependency, entities of the dependent set
are not dependent on each other.
* i.e. Ifa > {b, c} and there exists no functional dependency between b and
¢, then it is called a multivalued functional dependency.
+ For Example:
* Here, roll_no > {name, age} is a multivalued functional dependency, since
the dependents name & age are not dependent on each other(i.e. name
> age or age > name doesn’t exist !)Transitive Functional Dependency
* In transitive functional dependency, dependent is indirectly dependent on
determinant.
+ ie. Ifa > b & b > c, then according to axiom of transitivity, a > ¢. This is
a transitive functional dependency
* For Example:
* Here, enrol_no > dept and dept >
Hence, according to the axiom of transitivity, enrol_no > building_no is a valid
building_no,
functional dependency. This is an indirect functional dependency, hence called
Transitive functional dependency.