Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
normalizing Database; orignally it conatin column like Name,Phoneno,EmailAddress,Address , skill

As each student may have more skill.

1 NF:



Studentid(PK) FirstName LastName Phoneno EmailAddress StreetName City
1 F1 L1 88889 b@gmail.com westend pune
2 F2 L2 8888 a@gmail.com Eastend Mumbai

skillid(PK) skillname studentid(FK)
1 Java 1
2 .Net 2
3 Android 1
4 Oracle 1

Can u guide me what should be my 2NF & 3NF Normal form:
will skillid(PK) need to remove so database to be in 2NF?
Each time as i go to interview & i failed to write databse normalization upto 3NF
Posted
Updated 22-Jan-14 1:52am
v5

1 solution

Here[^] is a list. If I was getting this in interviews a lot, I would both memorise the forms ( actually, I did that any how ), and ask them 'do you mean standard or Boyce-Codd normal form' ? I bet half the people asking you, won't know what that means.

To get to second normal you remove subsets of data that apply to multiple rows of a table and place them in separate tables.

To get to third normal form you remove any columns that are not related to the primary key.

Second normal:

remove the skill id from the second table. Create a joining table so if two students have the same skill, the skill is in table a once, and joined to twice in the joining table.

Your data implies more than one student can have the same email. If this is true, then I guess that would need to be factored out, but they are surely more likely to have the same address or phone number, so it becomes a question of how granular you want to be.

I don't see anything here that directly violates the third normal form, which is one reason that I doubt your interviewers know as much as they want you to think.
 
Share this answer
 
Comments
patil.nitin8358 21-Jan-14 22:30pm    
Actually email address & Phoneno are different for each student , i have changed table entries
Christian Graus 21-Jan-14 22:41pm    
Great - I was scared that was a trap in the data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900