Solved

Can anyone please explain Normalization?

Posted on 2014-01-30
4
264 Views
Last Modified: 2014-02-04
I know this is basic, but normalization always confuses me.
I know the definitions for normalization.
Let  me say I have a
Company and Employee details like COMPANYNAME, COMPANYLOCATION,EMPLOYEEID,EMPLOYEEFIRSTNAME,EMPLOYEELASTNAME,DEPT,EMPLOYEEDEPT,EMPLOYEEID ........something like this.
Can any one please explain me how I can divide this in 1NF,2NF,3NF and 4NF.
0
Comment
Question by:RajG1978
4 Comments
 
LVL 16

Accepted Solution

by:
Surendra Nath earned 200 total points
ID: 39822670
ok, dividing this into normal form and explaining it can be done....
but this question is also better answered in here....

Before we go ahead for the explanation of normal forms here, I suggest you to go with the below web site which has a nice example related to the students

http://www.studytonight.com/dbms/database-normalization.php

check it out and let us know, if that does not serve your purpose of the question.
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 200 total points
ID: 39823008
It appears you know the theoretical definition but are seeking practical guidance.  With that in mind, think of normalization as the simplification of data.  The goal is to remove redundancy.  Do not store anything you can calculate from other data items.  For example, age is a function of birth date.  Volume, area, perimeter, et cetera are functions of length, width, and height.  Similarly, normalization seeks to reduce unnecessary repetition of lengthy data.  Instead of storing the same address for the 80 people in a company, you can save the address of the company once and reference the ID of the company/location on each employee or in an associative table.

Therefore, I would not get caught up in the normal forms.  In some practice, it may make sense to have some denormalization — or at least normalization at a lower normal form.  The key is to normalize data, so it fits business needs efficiently as well as effectively.

Hence, start with the entities.  In your case, you have companies, employees, departments, locations, et cetera.  Once you know the entities, think of the relationships.  If you put each entity in a table and carefully build relationships through associative tables or foreign keys, you will achieve sufficient normalization.

It also will force you to think through things like multiple locations per company, and other less obvious details about the entity relationships.

I am on my phone, so I trust my ramblings are translating well.

Anyway, I hope that helps some.

Best regards,

Kevin
0
 
LVL 15

Assisted Solution

by:JimFive
JimFive earned 100 total points
ID: 39824086
The idea of normalization is to remove redundancy in your data and make all of your data accessible via queries:
1NF:  Ensure that all data items contain only one value (no lists inside of columns).  Pull those items into their own table linked by the parent ID
2NF/3NF:  Ensure that all data in the table depends on the whole key.  In your example, the Employee information(depends on EmployeeID), Department information( on DeptID), and Company information are relatively independent and should be separated into distinct tables.  The difference between 2NF and 3NF is very subtle and has do with with whether the data is directly dependent or transitively dependent on the Candidate key.  The joke is that 2NF depends on "the whole key" and 3NF depends on "Nothing but the key"

Beyond 3NF is technical and often either trivial or not necessary.  One of them (I don't recall which one right now) requires that there be no NULL values.  Any column that could be null is extracted out into its own relation.  For practical purposes going beyond 3NF will either be unnecessary or will happen automatically as you need whatever feature you gain from it.

For your example, Extracting your data into tables for Company, Department, Employee and possibly location would easily put it into 3NF.
0
 

Author Closing Comment

by:RajG1978
ID: 39832978
Thanks a lot!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now