DOC PREVIEW
SJSU CS 157A - 1st, 2nd, and 3rd Normal Forms

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1st, 2nd, and 3rd Normal FormsOverviewDatabase NormalizationData AnomaliesBrief History/Overview1st Normal Form The Requirements1st Normal Form Example2nd Normal Form The Requirements2nd Normal Form Example3rd Normal Form The Requirements3rd Normal Form Example3rd Normal Form Example Cont.ConclusionReferences11stst, 2, 2ndnd, and 3, and 3rdrd Normal FormsNormal FormsBy By Carlos AlvaradoCarlos AlvaradoSan Jose State UniversitySan Jose State UniversityOverviewOverviewToday we’ll talk about:Today we’ll talk about:Database NormalizationDatabase NormalizationData Anomalies Caused by:Data Anomalies Caused by:Update, Insertion, DeletionUpdate, Insertion, DeletionBrief History/OverviewBrief History/Overview11st st Normal FormNormal Form22nd nd Normal FormNormal Form33rdrd Normal Form Normal FormConclusionConclusionDatabase NormalizationDatabase NormalizationThe main goal of Database The main goal of Database Normalization is to restructure the Normalization is to restructure the logical data model of a database to:logical data model of a database to:Eliminate redundancyEliminate redundancyOrganize data efficiently Organize data efficiently Reduce the potential for data Reduce the potential for data anomalies.anomalies.Data AnomaliesData AnomaliesData anomalies are inconsistencies in the Data anomalies are inconsistencies in the data stored in a database as a result of an data stored in a database as a result of an operation such as update, insertion, and/or operation such as update, insertion, and/or deletion.deletion.Such inconsistencies may arise when have a Such inconsistencies may arise when have a particular record stored in multiple locations particular record stored in multiple locations and not all of the copies are updated.and not all of the copies are updated.We can prevent such anomalies by We can prevent such anomalies by implementing 7 different level of implementing 7 different level of normalization called Normal Forms (NF)normalization called Normal Forms (NF)We’ll only look at the first three. We’ll only look at the first three. Brief History/OverviewBrief History/OverviewDatabase Normalization was first proposed by Database Normalization was first proposed by Edgar F. Codd.Edgar F. Codd.Codd defined the first three Normal Forms, which Codd defined the first three Normal Forms, which we’ll look into, of the 7 known Normal Forms.we’ll look into, of the 7 known Normal Forms.In order to do normalization we must know what In order to do normalization we must know what the requirements are for each of the three Normal the requirements are for each of the three Normal Forms that we’ll go over.Forms that we’ll go over.One of the key requirements to remember is that One of the key requirements to remember is that Normal Forms are progressive. That is, in order to Normal Forms are progressive. That is, in order to have 3have 3rdrd NF we must have 2 NF we must have 2ndnd NF and in order to NF and in order to have 2have 2ndnd NF we must have 1 NF we must have 1stst NF. NF.11st st Normal FormNormal FormThe RequirementsThe RequirementsThe requirements to satisfy the 1The requirements to satisfy the 1stst NF: NF:Each table has a primary key: minimal set Each table has a primary key: minimal set of attributes which can uniquely identify a of attributes which can uniquely identify a recordrecordThe values in each column of a table are The values in each column of a table are atomic (No multi-value attributes allowed).atomic (No multi-value attributes allowed).There are no repeating groups: two There are no repeating groups: two columns do not store similar information in columns do not store similar information in the same table.the same table.11st st Normal FormNormal FormExampleExampleUn-normalized Students Un-normalized Students table:table:Normalized Students table:Normalized Students table:StudentStudent##AdvIAdvIDDAdvNamAdvNameeAdvRooAdvRoommClassClass11ClassClass22123123123A123AJamesJames555555102-8102-8104-9104-9124124123B123BSmithSmith467467209-0209-0102-8102-8StudentStudent##AdvIAdvIDDAdvNamAdvNameeAdvRooAdvRoommClassClass##123123123A123AJamesJames555555102-8102-8123123123A123AJamesJames555555104-9104-9124124123B123BSmithSmith467467209-0209-0124124123B123BSmithSmith467467102-8102-822nd nd Normal FormNormal FormThe RequirementsThe RequirementsThe requirements to satisfy the 2The requirements to satisfy the 2ndnd NF:NF:All requirements for 1All requirements for 1stst NF must be met. NF must be met.Redundant data across multiple rows of Redundant data across multiple rows of a table must be moved to a separate a table must be moved to a separate table.table.The resulting tables must be related to each The resulting tables must be related to each other by use of foreign key.other by use of foreign key.22nd nd Normal FormNormal Form Example ExampleStudents tableStudents tableRegistration tableRegistration tableStudent#Student#AdvIDAdvIDAdvNameAdvNameAdvRoomAdvRoom123123123A123AJamesJames555555124124123B123BSmithSmith467467StudentStudent##ClassClass##123123102-8102-8123123104-9104-9124124209-0209-0124124102-8102-833rdrd Normal Form Normal FormThe RequirementsThe RequirementsThe requirements to satisfy the 3The requirements to satisfy the 3rdrd NF:NF:All requirements for 2All requirements for 2ndnd NF must be met. NF must be met.Eliminate fields that do not depend on Eliminate fields that do not depend on the primary key;the primary key;That is, any field that is dependent not only That is, any field that is dependent not only on the primary key but also on another field on the primary key but also on another field must be moved to another table.must be moved to another table.33rdrd Normal Form Normal Form Example ExampleStudents table:Students table:Student table:Student table:Advisor table:Advisor table:Student#Student#AdvIDAdvIDAdvNameAdvNameAdvRoomAdvRoom123123123A123AJamesJames555555124124123B123BSmithSmith467467StudentStudent##AdvIAdvIDD123123123A123A124124123B123BAdvIDAdvIDAdvNamAdvNameeAdvRooAdvRoomm123A123AJamesJames555555123B123BSmithSmith46746733rdrd Normal Form Normal Form Example Cont. Example Cont.Students table:Students table:Registration table:Registration table:Advisor table:Advisor


View Full Document

SJSU CS 157A - 1st, 2nd, and 3rd Normal Forms

Documents in this Course
SQL

SQL

18 pages

Lecture

Lecture

44 pages

Chapter 1

Chapter 1

56 pages

E-R Model

E-R Model

16 pages

Lecture

Lecture

48 pages

SQL

SQL

15 pages

SQL

SQL

26 pages

Lossless

Lossless

26 pages

SQL

SQL

16 pages

Final 3

Final 3

90 pages

Lecture 3

Lecture 3

22 pages

SQL

SQL

25 pages

Load more
Download 1st, 2nd, and 3rd Normal Forms
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 1st, 2nd, and 3rd Normal Forms and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 1st, 2nd, and 3rd Normal Forms 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?