Uploaded by ronettekelly

Mgt 5151 Week 4 Assignment

advertisement
R. Kelly
Assignment – Week 4
Database Systems Management MGT 5151
Professor William Cross
November 17, 2019
Normalization Factors
Consider the following:




What is normalization? What does it do?
Why is normalization needed?
Is there such a thing as "too much" normalization? Why or why not?
Provide an example of proper normalization and one for poor normalization. Include
SQL operations that would be more/less efficient for your examples.
Normalization is what is used to organize data in a database. It’s used to create tables and set
up relationships between tables rendering to the rules designed to make the database flexible
by taking away inconsistent and redundant dependencies. When you have redundant data, it
can cause space to be taken up in the database and can cause maintenance issues. If you
have data in multiple places instead of one place, it must be changed in the exact same way
in all places. For example, if you have a customer’s phone number only in the Customers
table it would be easier to change, instead of having to change in multiple locations within
the database. Rules for database normalization is called “normal form”. The first rule that is
observed is called the “first normal form”. If you have three rules that are observed, it’s
called the “third normal form”. Once you get to the third normal form, it’s usually
considered the maximum level necessary for applications.
Normalization needs multiple tables and if you have any redundancies, prepare the
application to handle any problems that may deliver inconsistent dependencies. It’s
important to have data normalization because it can cut back or wipe out data redundancy
and it helps to maintain information in a rational database which may contain the same
information in multiple places.
Too much normalization can exist, and it can cause long queries and performance issues.
When you have too much normalization it will allow all flag columns to turn into a foreign
key which will point to another record that will display a message of true or false. This can
result in hundreds of arms spreading throughout the database. One example is the reason for
not creating a “City Table” which you would not need to add much information about a city.
When you normalize a data, it should be as minimal as possible to prevent such unneeded
information added to the normalization of the database.
Below are the examples of Proper and Poor Normalization tables.
1NF form:
Unnormalized Table:
Student#
1255
7389
Advisor
Jessup
Hurst
Adv-Room
613
527
Class1
001-08
101-08
First Normal Form: No Repeating Groups
Student#
1255
1255
1255
7389
7389
7389
Advisor
Jessup
Jessup
Jessup
Hurst
Hurst
Hurst
Adv-Room
613
613
613
527
527
527
2NF:
Second Normal Form: Eliminate Redundant Data
Students:
Student#
1255
7389
Advisor
Jessup
Hurst
Registration:
Student#
1255
1255
1255
7389
7389
7389
Class#
001-08
025-01
050-02
101-08
111-02
114-01
Adv-Room
613
527
Class#
001-08
025-01
050-02
101-08
111-02
114-01
Class2
025-01
111-02
Class3
050-02
114-01
3NF:
Third Normal Form: Eliminate Data Not Dependent on Key
Students:
Student#
1255
7389
Advisor
Jessup
Hurst
Faculty:
Name
Jessup
Hurst
Room
613
527
Dept
32
32
Poor Normalization:
Table:
Student#
1255
1255
1255
7389
7389
7389
FirstName
Nia
Nia
Nia
Rosetta
Rosetta
Rosetta
After normalization:
Student#
1255
1255
1255
7389
7389
7389
Class#
001-08
025-01
050-02
101-08
111-02
114-01
LastName
Jessup
Jessup
Jessup
Hurst
Hurst
Hurst
Class#
001-08
025-01
050-02
101-08
111-02
114-01
Student#
1255
1255
1255
7389
7389
7389
FirstName
Nia
Nia
Nia
Rosetta
Rosetta
Rosetta
LastName
Jessup
Jessup
Jessup
Hurst
Hurst
Hurst
This will not be efficient:
Select FirstName, LastName where Class# = 001-08.
Unable to have two classes for the same student.
Download