0

As the title states. I have read many articles trying to wrap my head around this, but am still not sure if I am doing it right or not. I think I am getting the hang of it, but wanted to get some more opinions in case I do need to correct what I am doing. Example is below. Thanks!

1NF Employee_ID,Last Name, First Name, Street, City, Zip, D.O.B., Age, Degree required

2NF Employee_ID, Last Name, First Name, D.O.B, Age, Degrees Recieved Location_ID, street, city, zip

3NF Employee_ID, Last Name, First Name, Age Birth date, D.O.B. Location_ID Street Zip Code, City

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
Temple90
  • 45
  • 5
  • Apologize in advance. I know that it did not scan in well. – Temple90 Feb 21 '19 at 17:56
  • 5
    You should take the time and provide your example as `formatted text`. Your example is not readable. – Tony Feb 21 '19 at 17:58
  • 1
    There are free tools online that you can use to create a digital version of your example, then you can share it with us to make it easier to read. – haag1 Feb 21 '19 at 18:02
  • [To get to 3NF](https://stackoverflow.com/questions/246701/what-is-normalisation-or-normalization/31643716#31643716). 1) Remove repeating groups 2) [Remove partial key dependencies](https://stackoverflow.com/questions/25747802/partial-dependencydatabases) 3) [Remove non key dependencies (aka transitive)](https://stackoverflow.com/q/39566058/495157) – JGFMK Feb 21 '19 at 19:45
  • Find a published academic textbook introduction to information modeling & database design. (Dozens are free online in pdf. stanford.edu has a free online course.) Give your textbook name & edition & show & justify your work following it & explain where you are stuck. Otherwise you are just asking us to rewrite ti with a bespoke tutorial. See hits googling 'stackexchange homework'. Use text, not images/links, for text, including tables & ERDs. [Beware that there is no one 1NF.](https://stackoverflow.com/a/40640962/3404097) – philipxy Feb 21 '19 at 20:21
  • I understand how to remove partial and non key dependencies, but am more so confused about how the primary and foreign keys play in. Here is my revised version – Temple90 Feb 21 '19 at 21:03
  • PKs & FKs are irrelevant to normalization. "remove partial and non key dependencies" is not appropriate. Details matter. Please act on my last comment. Including, [use text, not images/links, for text](https://meta.stackoverflow.com/q/285551/3404097). (Image textual content cannot be searched for or cut & pasted. Posts should be self-contained.) PS Google 'stackexchange notifications' to learn to use @x to notify user x of a comment when they are not the poster or the only other commenter. – philipxy Feb 21 '19 at 22:14

1 Answers1

0

Summarised: 2NF is when every non-key attribute depends on the whole primary key. So imagine a CD. The CD has an ID number, which is the primary key. The name, artist and gender of the artist are dependent on the primary key. So this is correct:

Table_CD:
CD_ID:    Name:    Artist:    Artist_Gender: 
1         CD1      Artist1    Male
2         CD2      Artist1    Male
3         CD3      Artist2    Female

This is correct for 2NF because artist is dependent on the Key (CD_ID). We dont check for transitive dependency.

In 3NF you simply say there can be no dependencies on something that is not the key. The gender of the artist depends on the artist. Not on the CD_ID, which is the key. Therefore it is not 3NF.

To make it 3NF you must seperate out the transitive dependency. Hence the gender of the artist. Thus:

Table_CD:
CD_ID:    Name:    Artist:
1         CD1      Artist1 
2         CD2      Artist1 
3         CD3      Artist2 

Table_Artist:
Name:          Gender:
Artist1        Male
Artist2        Female
Kars
  • 845
  • 1
  • 14
  • 33
  • Thank you for the summary. The simplified summary is a very easy way to understand this. I will redo this in word and post it on here. – Temple90 Feb 21 '19 at 18:13
  • Feel free to comment on my answer again when you've edited it i will take a look – Kars Feb 21 '19 at 18:16
  • @Temple90 & Kars "2NF is when every non-key attribute depends on the whole primary key." & "In 3NF you simply say there can be no dependencies on something that is not the key." & "To make it 3NF you must seperate out the transitive dependency." are wrong. Details matter. See a textbook definition. – philipxy Feb 21 '19 at 22:06