Multivalued dependency, normalization in Dbms

Fully Funetional Dependency :-

             Fully functional dependency generally applies to tables with composite keys (primary key composed of two or more attributes). 
            If A and B are attributes of a relation R, then B is fully functionally dependent on A if B is functionally dependent on A, but not functionally dependent on any proper subset of A.
              In other words, fully functional dependency means that when a primary key is composite ie. made of two or more columns then the other columns (non-key attributes) must be identified by the entire key and not by just some of the columns that make up the primary key .
                Example: Let us consider the following ITEM table to explain fully functional dependency .
In the above table, primary key is composed of two attributes (ltem_No, Item_Name). LDe attnbute Quantity is fully functional dependent on the primary key and not on any subset t Le. the attribute Quantity is not functionally dependent on either tem_No or on eName because corresponding to each ltem_No or Item_Name, there are multiple values for the Quantity attribute. So, it is represented as:                                                          (Item_No, Item_Name) > Quantity 
              The attribute Price is not fully functionally dependent on the primary key (ltem_No, lem_Name) because Price attribute is functionally dependent on Item_Name attribute. ough Price attribute is not functionally dependent on Item_No attribute. But according to ules of fully funetional dependency, the attribute must not be functionally dependent on any subset of the primary key fields composed of more than one atributes.
  •  Multi-valued Dependency :- 
Multi-valued dependencies occur when the presence of one or more rows in a tahle involves the presence of one or more other rows in that same table.
              For example: Imagine a car company that manufactures many models of car, but always makes both red and blue colors of each model. If you have a table that contains the mode name, color and year of each car the company manufactures, there is a multivalued dependency in that table. If there is a row for a certain model name and year in blue, there must also be a similar row corresponding to the red version of that same car.
             "Multi-valued dependency defines a relationship in which set of values in attribute B of relation R are determined by a single value of anribute A.
              Multivalued dependency represented as A>>B.
         For Example: Let us consider the following EMPLOYEE table to explain multivalued dependency:
In the above table, the attribute Child is multivalued dependent on attribute Name ( Name Child) i.e. corresponding to an employee name, we have multiple values of Like- chi The employee Randhir has two vaBues (Aman, Simran) and employee "Rahut one value (Amit). Thus a given attribute Name uniquely deternines a set of values for tne Child attribute. So. when a given attribute uniquely determines the same set of values fo other attribute, then multivalued dependency occus.
  • NORMALIZATION :-
             Normalization is the process of efficiently organizing data in a database. This includes creal aling tables and establishing relationships between those tables according to rules designed to protect the data and to make the database more flexible by eliminating redundancy both sistent dependency. The basic objective of normalization is to reduce redundancy which means that imtormation is to be stored only once. Storing information several times teads to wastage of storage space and increase in the total size of the data stored. In RDBMS, ations (tables) are normalized so that when relations in a database are to be altered during the life time of the database, we do not lose information or introduce inconsistencies. 
               Norimalization is a step by steP process of removing different kinds of redundancy and anomaly at cach step. At cach step a specific rule is followed to remove specific kind of purity in order to give the database a slim and clean look. Each rule is called a "Normal Form".If the first rule is observed, the database is said to be in "First Normal Form." If the fizM three rules are observed, the database is considered to be in "Third Normal Form." Although other levels of normalization are possible, third normal form is considered the highest level necessary for most applications.
  • Un-Normalized Form (UNF) :-
                      If a table contains non-atomic values at each row, it is said to be in Un-Normalized Form (UNF). An Atomic value is something that can not be further decomposed. A Non-atomic value, as the name suggests, can be further decomposed and simplified. Consider the following "STUDENT" table: 
                 In he above "STUDENT" able, there are multiple occurrences of rows under each key Student Id. Although considered to be the primary key, Student_ld cannot give us the unique fentification facility for any single row. Further, each primary key points to a variable length tecord 13 for 1022. 2 for 4123 ).

Post a Comment

0 Comments