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.
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?
1. Explain the concept of economics. 2. Distinguish between microeconomics and macroeconomics. 3. Explain the difference...
1. Explain the concept of economics. 2. Distinguish between microeconomics and macroeconomics. 3. Explain the difference between positive and normative statements. 4. Describe the economic way of thinking. 5. Examine opportunity costs and the trade-offs in economics that people face. 6. Discuss factors influencing demand and supply. 7. Elaborate on market equilibrium. 8. Define economics. 9. Explain the concepts of scarcity and opportunity cost and how they relate to the definition of economics. 10. Explain the distinguishing characteristics of the...
3. Briefly explain the difference between external and internal economies of scale. Why is it that...
3. Briefly explain the difference between external and internal economies of scale. Why is it that if an industry is operating under conditions of internal scale economies then we cannot have perfect competition? 4. State one factor which may lead to external economies of scale.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT