Before discussing about the dependencies let us know what is meant by Entity and Attribute.
Three type of dependencies in DBMS
Entity: It is a person, place, event or thing about which the information is mentioned. For example employee, customer, student are called entities.
Attribute:The characteristic property that describes an entity is called attribute. For example emp number of employee or customer id of customer entity.
Three type of dependencies in DBMS
- Functional Dependency
- Partial Functional Dependency
- Transitive Dependency.
1. Functional Dependency:
- In a relation R, an attribute B said to be a functional dependent on attribute 'A' if the value of an attribute 'B' is uniquely determined by the value in the attribute 'A'
- The functional dependency 'B' on 'A' is represented as A-->B. B dependent on A.
2. Partial Functional Dependency:
- It is functional dependency in which some non key attributes will depends on part of key columns.
- In the above table name, sal depends on only empno
- But course completed date depends on empno, course title.
- To identify the row uniquely in the table empno, course title should be declared as key columns.
- Now non key attributes name, sal depends only on part of a key column, i.e, empno
- This type of functional dependency called as partial functional dependency.
3. Transitive Dependency:
- The functional dependency between two non key attributes is called transitive dependency.
Ex: customer table
Transitive Dependency |
- custid is identified as key column in customer table but the region dependent on only salesman.
- The functional dependency between non key attributes region, salesman is called the transitive dependency.
No comments:
Post a Comment