Wednesday, 14 January 2015

Normalization Background - Definition must to know



Before we jump to removing anomalies in a table, we must know definition of terms which would help us in understanding the anomalies and solve them.
Functional dependency
In a given table, an attribute Y is said to have a functional dependency on a set of attributes X (written X → Y) if and only if each X value is associated with precisely one Yvalue. For example, in an "Employee" table that includes the attributes "Employee ID" and "Employee Date of Birth", the functional dependency {Employee ID} → {Employee Date of Birth} would hold. It follows from the previous two sentences that each {Employee ID} is associated with precisely one {Employee Date of Birth}.

Full functional dependency
An attribute is fully functionally dependent on a set of attributes X if it is:
  • functionally dependent on X, and
  • not functionally dependent on any proper subset of X. {Employee Address} has a functional dependency on {Employee ID, Skill}, but not a full functional dependency, because it is also dependent on {Employee ID}. Even by the removal of {Skill} functional dependency still holds between {Employee Address} and {Employee ID}.
Transitive dependency
transitive dependency is an indirect functional dependency, one in which XZ only by virtue of XY and YZ.
Trivial functional dependency
A trivial functional dependency is a functional dependency of an attribute on a superset of itself. {Employee ID, Employee Address} → {Employee Address} is trivial, as is {Employee Address} → {Employee Address}.
Multivalued dependency
multivalued dependency is a constraint according to which the presence of certain rows in a table implies the presence of certain other rows.
Join dependency
A table T is subject to a join dependency if T can always be recreated by joining multiple tables each having a subset of the attributes of T.
Superkey
superkey is a combination of attributes that can be used to uniquely identify a database record. A table might have many superkeys.
Candidate key
candidate key is a special subset of superkeys that do not have any extraneous information in them: it is a minimal superkey.
Example: A table with the fields <Name>, <Age>, <SSN> and <Phone Extension> has many possible superkeys. Three of these are <SSN>, <Phone Extension, Name> and <SSN, Name>. Of those, only <SSN> is a candidate key as the others contain information not necessary to uniquely identify records ('SSN' here refers to Social Security Number, which is unique to each person).
Non-prime attribute
A non-prime attribute is an attribute that does not occur in any candidate key. Employee Address would be a non-prime attribute in the "Employees' Skills" table.
Prime attribute
A prime attribute, conversely, is an attribute that does occur in some candidate key.
Primary key
One candidate key in a relation may be designated the primary key. While that may be a common practice (or even a required one in some environments), it is strictly notational and has no bearing on normalization. With respect to normalization, all candidate keys have equal standing and are treated the same.

Move to highest level: http://akash-online.blogspot.in/p/database-normalization-1.html
This will help understand things with Example.



No comments:

Post a Comment