NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two...
-
Upload
ashley-hancock -
Category
Documents
-
view
213 -
download
0
Transcript of NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two...
![Page 1: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/1.jpg)
NORMALIZATION
![Page 2: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/2.jpg)
What is Normalization
The process of effectively organizing data in a database
Two goals To eliminate redundant data Ensure data dependencies make sense
Guidelines are called normal forms There are 1 thru 6 They are guidelines - not cast in
concrete
![Page 3: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/3.jpg)
1st Normal form
Written as 1NF Eliminates duplicate column from the
same table Creates separate tables for each group
of related data Identifies each row with a unique column
or set of columns – Primary Key
![Page 4: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/4.jpg)
2nd Normal Form
Must meet all first normal form requirements
Removes subsets of dta that apply to multiple rows of a table and puts them in separate tables
Creates relationships between these new tables and their predecessors thru the use of Foreign Keys
![Page 5: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/5.jpg)
3rd Normal Form
Meets all the requirements of second normal form
Removes columns that are not dependent upon the primary key
![Page 6: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/6.jpg)
4th Normal Form – Boyce Codd Meets all the requirements of the 3rd
normal form Has no multi-valued dependencies
![Page 7: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/7.jpg)
5th Normal Form
Fifth normal form deals with cases where information can be reconstructed from smaller pieces of information that can be maintained with less redundancy.
Second, third, and fourth normal forms also serve this purpose, but fifth normal form generalizes to cases not covered by the others.
![Page 8: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/8.jpg)
6th Normal Form
Must be in 5th normal form Sixth normal form is intended to decompose
relation variables to irreducible components. Though this may be relatively unimportant for non-
temporal relation variables, it can be important when dealing with temporal variables or other interval data.
For instance, if a relation comprises a supplier's name, status, and city, we may also want to add temporal data, such as the time during which these values are, or were, valid (e.g. for historical data) but the three values may vary independently of each other and at different rates.
We may, for instance, wish to trace the history of changes to Status.
![Page 9: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/9.jpg)
Primary Key
The primary key of a table must be unique to identify the record in the table.
It's also possible to have a table with a primary key made up of two or more columns.
This occurs when a single column can't contain enough unique values. For example, a two column primary key
might consist of a "FirstName" and "LastName" column.
![Page 10: NORMALIZATION. What is Normalization The process of effectively organizing data in a database Two goals To eliminate redundant data Ensure data.](https://reader036.fdocuments.net/reader036/viewer/2022082821/5697c0271a28abf838cd6361/html5/thumbnails/10.jpg)
Foreign Key
A foreign key is a field (or fields) that points to the primary key of another table.
The purpose of the foreign key is to ensure referential integrity of the data.
Customer table – customer Id is the primary key
In an Orders table – the customer id is the foreign key