Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

The Second Normal Form (2NF)

Definition: A relation is in 2NF if it is in 1NF and each non-key attribute is fully dependent on each candidate key of the relation.

Some of the points that should be noted here are:

  • A relation having a one attribute key has to be in 2NF.
  • In the case of composite key, partial dependency on key that is part of the key is not allowed.
  • 2NF tries to make sure that information in one relation is about one thing
  • Non-key attributes are those that are not part of any candidate key.

Let us now reconsider, which describes the FDs of the relation to the relation STUDENT (Enrolmentno, Sname, Address, Cno, Cname, Instructor, Office). These FDs can also be written as:

Enrolmentno     →         Sname,           Address     (1)

Cno                 →           Cname,           Instructor  (2)

Instructor        →                                   Office        (3)

 

The key attributes of the relation are (Cno + Enrolmentno). Rest of the attributes are non-key attributes. For the 2NF decomposition, we are concerned with the FDs (1) and (2) as above as they relate to partial dependence on the key that is (Cno +Enrolmentno). As these dependencies illustrates that relation in not in 2NF and therefore suffer from all the three anomalies and redundancy troubles as many non-key attributes can be derived from partial key attribute. To change the relation into 2NF, let us use FDs. As per FD (1) the Enrolment number uniquely verify student name and address, so one relation should be:

STUDENT1 (Enrolmentno, Address, Sname)

Now as per FD (2) we can decompose the relation more, but what about the attribute 'Office'?

We find in FD (2) that Course code (Cno) attribute uniquely shows the name of instructor (refer to FD 2(a)). Also the FD (3) means that name of the instructor uniquely shows office number. This can be written as:

Cno        →             Instructor                  (2 (a)) (without Cname)

Instructor          →                                    Office            (3)

⇒      Cno      →                                      Office  (This is transitive dependency)

 

Therefore, FD (2) now can be rewritten as:

Cno                  →         Cname, Instructor, Office           (2')

This FD, now provides us the second decomposed relation:

COU_INST (Cno, Cname, Instruction, Office)

Therefore, the relation STUDENT has been decomposed into two relations:

STUDENT1 (Enrolmentno, Sname, Address) COU_INST (Cno, Cname, Instruction, Office)

Is the decomposition into 2NF finish now?

No, how would you join the two relations formed above any way? Please note we have super FDs as, because (Cno +Enrolmentno) is the primary key of the relation STUDENT:

Enrolmentno, Cno       →        ALL ATTRIBUTES

Every attributes except for the key attributes that are Cno and Enrolmentno, Though, are covered on the right side of the FDs (1) (2) and (3), therefore, making the FD as redundant. But in any situation we have to have a relation that connects the two decomposed relations. This relation would cover any attributes of Super FD that have not been covered by the key attributes and the decomposition. Therefore, we need to make a joining relation as:

COURSE_STUDENT (Enrolmentno, Cno)

 So, the relation STUDENT in 2NF form would be:

STUDENT1 (Enrolmentno, Sname, Address)                   2NF(a)

 COU_INST (Cno, Cname, Instruction, Office)                 2NF(b)

 COURSE_STUDENT (Enrolmentno, Cno)                         2NF(c)

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M9526584

Have any Question?


Related Questions in DBMS

Database design and development assignment -assessment task

Database Design and Development Assignment - Assessment task - 1. Normalization a) Map the ERD, from the sample solution, into a set of relations in at least Third Normal Form (3NF). You must ensure that your relations m ...

Tableau is business intelligence software that helps people

Tableau is business intelligence software that helps people see and understand their data. Fast Analytics Connect and visualize your data in minutes. Tableau is 10 to 100x faster than existing solutions. Ease of Use Anyo ...

In sql developer onlydeliverables include sql scripts and

In SQL Developer ONLY! Deliverables Include SQL scripts and screenshot of the results: D1. Create the following three user-defined roles that are shown in the table below and assign them the specified permissions for the ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

In this section the student is required to develop a

In this section, the student is required to develop a technical debate based on his/her understanding using available scientific literature. The answer to this question should not exceed three A4 Pages. In the traditiona ...

Project outline and requirements provide a brief

Project Outline and Requirements Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size, location(s), and other pertinent ...

Sqlquery 1 how many products have standard price less than

SQL Query 1. How many products have standard price less than 1000? Query 2: Display all attributes for products made of "Cherry" from Product table w/o referring to column names. Query 3: Display all product names having ...

Your taskyou have been commissioned to develop a database

Your task You have been commissioned to develop a database system that is capable of keeping records for FU's table tennis matches from now on. The database needs to keep a record of: - All team information, including pl ...

This assignment is a continuation of this solution the case

This assignment is a continuation of this solution The case study company has received the first report from its enterprise content management (ECM) consultant and now has a documented list of major content requirements ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As