Question

In: Computer Science

Explain the difference between 2NF and 3 NF relations

Explain the difference between 2NF and 3 NF relations

Solutions

Expert Solution

A relation is said to be in second normal form when it is already in first normal form and there is no partial functional dependency that is no non-prime attribute should be functionally dependent on prime attribute. It was given by E.F Codd in 1971. If the candidate key comprises of only single attribute and relation is in 1NF then it is already in 2NF. The concept of checking relation for 2NF applies when there is composite candidate key that is candidate key comprises of more than one attribute.

Example:
Consider a relation R(A, B, C, D) with functional dependencies: {AB–>CD, BC–>D}

Closure of (AB)={A, B, C, D} 

So AB is a candidate key.
The relation R is in 1NF as relational DBMS does not allow multi-valued or composite attribute.
In AB–>CD (AB is candidate key and C, D is non-prime)
In BC–>D (BC is non-prime and D is non-prime which is allowed in 2NF)
The relation R is in 2NF as no prime attribute is deriving non prime attibute that is there is no partial functional dependency.
The relation R is not in 3NF as non-prime attribute is deriving non-prime attribute.

2. Third Normal Form (3NF) :
A relation is said to be in third normal form when it is already in first normal and second normal forms and every non prime attribute is non-transitively dependent on superkey of relation or in simple language there is no transitive functional dependency. It was also given by E.F Codd in 1971. In this form duplication of data is reduced and referential integrity is ensured. A relation R having functional dependency A–>B is in 3NF if either of the conditions given below are true .

  1. A is a superkey.
  2. B is prime attribute, that is B is the part of candidate key.

Example:-
Consider a relation R(A, B, C) having functional dependency {AB–>C, C–>A}

Closure of (AB)={A, B, C}
Closure of (BC)={A, B, C}
Candidate keys are-{AB, BC} 

The relation R is in 1NF as relational DBMS does not allow multi-valued or composite attribute.

AB-->C(prime deriving prime)
C-->A(prime deriving prime) 

So the relation R is in 2NF and in 3NF also because there is no prime deriving non-prime and no non-prime deriving non-prime that is there is no partial functional dependency and no transitive functional dependency.

Difference between 2NF and 3NF :

S.NO. 2NF(SECOND NORMAL FORM) 3NF(THIRD NORMAL FORM)
1. It is already in 1NF. It is already in 1NF as well as in 2NF also.
2. In 2NF non-prime attributes are allowed to be functionally dependent on non-prime attributes. In 3NF non-prime attributes are only allowed to be functionally dependent on Super key of relation.
3. No partial functional dependency of non-prime attributes are on any proper subset of candidate key is allowed. No transitive functional dependency of non-prime attributes on any super key is allowed. .
4. Stronger normal form than 1NF but lesser than 3NF Stronger normal form than 1NF and 2NF.
5. It eliminates repeating groups in relation. It virtually eliminates all the redundancies.
6. The goal of the second normal form is to eliminate redundant data. The goal of the third normal form is to ensure referential integrity.

Related Solutions

Explain the difference between the practice of advertising and the practice of public relations. Find an...
Explain the difference between the practice of advertising and the practice of public relations. Find an example of an ad that delivers sales and one that creates a public positive attitude. (If possible, find examples from the same company).
3. Explain the difference between exchange efficiency and production efficiency.
3. Explain the difference between exchange efficiency and production efficiency.
3) What is the difference between selling and marketing? Explain briefly.
3) What is the difference between selling and marketing? Explain briefly.
Explain the difference between a call option and a put option. Explain the difference between an...
Explain the difference between a call option and a put option. Explain the difference between an American option and European option. Find the value of a call option using the binomial option pricing formula for single period when given the following information: you have an option with 6 months until expiration, the payoff in the up scenario is $12, and the payoff in the down scenario is $0, the risk-free rate is 5%, the weight for the up scenario is...
What is the difference between a Need and a want? State and explain the three (3)...
What is the difference between a Need and a want? State and explain the three (3) basic economic concepts.
Explain the difference between statistical and practical significance. Explain the difference between the null and alternative...
Explain the difference between statistical and practical significance. Explain the difference between the null and alternative hypotheses. When should a one-tailed test be used? What are the disadvantages to using a one-tailed test? When should you use a two-tailed test? Define a Type I error. In the behavioral sciences, what is the likelihood of a Type I error? Define a Type II error. In the behavioral sciences, what is the likelihood of a Type II error?
A: explain the difference between fixed and variable cost. B: explain the difference between explicit and...
A: explain the difference between fixed and variable cost. B: explain the difference between explicit and implicit cost. C: in the long run in perfect competition economist say that profit =0 but would any firm be involved in that market in the first place?
Explain the difference between an acute and chronic wound. Explain the difference between healing by primary...
Explain the difference between an acute and chronic wound. Explain the difference between healing by primary and secondary intention. List the signs and symptoms of surgical wound infection in a client. Explain 2 factors that affect wound healing. Define serous, serosanguineous, sanguineous and purulent.
Please answer the following questions: Wich are the difference between public relations and branding, and how...
Please answer the following questions: Wich are the difference between public relations and branding, and how they work together What is PR's role in building customer satisfaction? Why is corporate sponsorship of concerts, festivals, and even the Olympics considered a good marketing and public relations strategy? Why are timing and scheduling so important in a public relations campaign?
discusses the difference between public relations and advertising. Cite an organization or individual and give one...
discusses the difference between public relations and advertising. Cite an organization or individual and give one example of public relations and one example of advertising in either a print or electronic media form used for that organization. try to give me an example of public relations and an example of advertising.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT