Functional dependency, Database Management System

Assignment Help:

Functional Dependency

Consider a relation R that has 2 attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for every value of A, no more than one value of B is related. In differet words, the value of attribute A uniquely shows the value of attribute B and if there were various tuples that had the similar value of A then all these tuples will have an identical value of attribute B. That is, if t1 and t2 are two tuples in the relation R where t1(A) = t2(A), then we must have  t1(B) = t2(B).

Both, A and B require not be single attributes. They could be any subsets of the attributes of a relation R. The FD among the attributes can be written as:

R.A →R.B    or  easily  A  → B,  if  B  is  functionally  dependent on  A  (or  A functionally gives B). Please note that functional dependency does not imply a one-to-one relationship among A and B.

For example, the relation in Figure, whose dependencies are given in Figure, can be written as:

                                         Enrolmentno →Sname Enrolmentno → Address Cno →Cname

                                                                              Cno → Instructor

                                                                             Instructor →Office

These functional dependencies entail that there can be only single student name for every Enrolmentno, only one address for each student and only one subject name for each Cno. It is of course possible that various students may have the similar name and various students may live at the similar address.

If we take Cno Æ Instructor, the dependency implies that no subject can have more than single instructor (maybe this is not a very realistic assumption). Functional dependencies thus place constraints on what information the database may store. In the instance above, you may be wondering if the following FDs hold:

                                         Sname → Enrolmentno                                                                (1)

                                         Cname →Cno                                                                               (2)

Certainly there is nothing in the given situation of the database relation presented that contradicts the functional dependencies as over. Though, whether these FDs hold or not would depend on whether the college or university whose database we are allowing for duplicate course names and student names. If it was the activity policy to have unique course names than (2) holds. If duplicate student names are feasible, and one would think there always is the possibility of two students having exactly the name, then (1) does not hold.

An easy example of the functional dependency over is when A is a primary key of an entity (e.g., enrolment number: Enrolment no) and B is some one-valued property or attribute of the entity (e.g., student name: Sname). A →B then must always hold. (Why?)

Functional dependencies also occur in relationships. Suppose C is the primary key of an entity and D is the primary key of another entity.  Let the two entities have a relationship. If the relationship is one-to-one, we have to do both C → D and D → C . If the relationship is many-to-one (Con many side), we would have C → D but not D →C . For many-to-many relationships, no functional dependencies grasp.

For example, let  consider the following E-R diagram

                               236_Functional Dependency.png

 

                                                       Figure:  E-R diagram for student course Teacher

In the ER diagram as over, the following FDs exist:


Related Discussions:- Functional dependency

Define the term database, QUESTION (a)(i) Define the term database. ...

QUESTION (a)(i) Define the term database. (ii) How is it different from a database management system? (b) What is the difference between an entity and an attribute? (c

Data handling and research methods, Data Handling and Research Methods: ...

Data Handling and Research Methods: The dataset encompassing 130 participants contains several variables measuring detrimental health related behaviours referring to the use o

Define the five basic operators of relational algebra, Define the five basi...

Define the five basic operators of relational algebra? Five basic operators of relational algebra are: 1. Union (∪∪∪∪) - Selects tuples which are in either P or Q or in both

Eer diagram, Design an EER schema for the following application and transla...

Design an EER schema for the following application and translate the EER schema into relational schemas (and constraints). It is possible that some requirements cannot be captured

Describe log based recovery, Describe log based recovery The most usabl...

Describe log based recovery The most usably structure for recording data base modification is the LOG the log is a sequence of log records recording all the update activities i

State the data flow diagram of functional model, State the data flow diagra...

State the data flow diagram of functional model Any action initiated by transition in the state diagram can be extended into an entire data flow diagram in functional model. Th

B+ tree, construct a B+ tree for the following set of key value (2,3,5,7,11...

construct a B+ tree for the following set of key value (2,3,5,7,11,19,23,29,31) in ascending order where the pointers that will fit in one node is as follows:A. four B. six C. eigh

Name the metrics for selecting top algorithm, Name the metrics for selectin...

Name the metrics for selecting top algorithm There are a number of metrics for selecting top algorithm: i) Computational complexity: Computational complexity refers to eff

Query optimization in database system, Problem : AirwaysCentre, an inte...

Problem : AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations: P

Create a database model, Submit the table creation statements (including co...

Submit the table creation statements (including constraints) for the Database Model. Submit them all in a single script file. Also submit a document explaining what test data yo

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd