Presentation is loading. Please wait.

Presentation is loading. Please wait.

1.  Database normalization is a design technique for structuring relational database tables.  More highly normalized tables reduce data duplication.

Similar presentations


Presentation on theme: "1.  Database normalization is a design technique for structuring relational database tables.  More highly normalized tables reduce data duplication."— Presentation transcript:

1 1

2  Database normalization is a design technique for structuring relational database tables.  More highly normalized tables reduce data duplication and opportunities for various kinds of logical inconsistencies.  They greatly simplify development, maintenance, and expandability of the database. 2

3 A table that is not sufficiently normalized can suffer from logical inconsistencies of various types Update anomaly Insertion Anomaly Deletion Anomaly 3 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

4 The Normal Forms Edgar F. Codd, the inventor of the relational model, introduced the concept of normalization and what we now know as the First Normal Form (1NF) in 1970. Edgar F. Coddrelational model1NF Codd went on to define the Second Normal Form (2NF) and Third Normal Form (3NF) in 1971.2NF3NF Codd and Raymond F. Boyce defined the Boyce-Codd Normal Form (BCNF) in 1974.Raymond F. BoyceBoyce-Codd Normal Form Higher normal forms were defined by other theorists in subsequent years, the most recent being the Sixth normal form (6NF) introduced by Chris Date, Hugh Darwen, and Nikos Lorentzos in 2002.Sixth normal formChris DateHugh DarwenNikos Lorentzos 4 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

5 The most common normal forms, from least normalized to most normalized, are as follows: 1.First normal form(1NF) 2.Second normal form (2NF) 3.Third normal form (3NF) 4.Boyce-Code normal form (BCNF) 5.Fourth normal form(4NF) 6.Fifth normal form(5NF) 7.Sixth normal form(6NF) 5 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

6 Emp IdNameMgr IdManagerDepttDeptt IdChildren 285Carl01SmithersFinance01FBart 365Jenny01SmithersFinance01FLina 458Jay02JoelIT01IDivya 459Jeet02JoelITo1ISaumya, Shalin 560Tina03MargareettHR01HMaggie, Lisa Zero Normal Form 6 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

7 Rules(Converting from UNF to 1NF): First normal form sets the most basic rules for the database.  A relation in which the intersection of each row and column contains one and only one value.  Remove the repeating group by Entering data into empty columns of rows which contain the repeating data. Children Bart Lina Divya Saumya, Shalin Maggie, Lisa Children Bart Lina Divya Saumya Shalin Maggie Lisa 7 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

8 Emp IdNameMgr IdManagerDepttDeptt IdChildren 285Carl01SmithersFinance01FBart 365Jenny01SmithersFinance01FLina 458Jay02JoelIT01IDivya 459Jeet02JoelITo1ISaumya 459Jeet02JoelITo1IShalin 560Tina03MargareettHR01HMaggie 560Tina03MargareettHR01HLisa 8 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

9 In Our Problem : Emp Id Children Emp Id Name Emp Id Mgr Id,manager, Deptt, Deptt Id Functional Dependency: Main concept associated with normalization. Describes the relationship between attributes in a relation. – For example, if A and B are attributes of relation R, B is functionally dependent on A (denoted A -> B) 9 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

10 Emp IdMgr IdManagerDepttDeptt Id 28501SmithersFinance01F 36501SmithersFinance01F 45802JoelIT01I 45902JoelITo1I 56003MargareettHR01H Emp IdName 285Carl 365Jenny 458Jay 459Jeet 560Tina Emp IdChildren 285Bart 365Lina 458Divya 459Saumya 459Shalin 560Maggie 560Lisa 10 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

11 Transitive Dependency : In a relation, if attribute(s) A->B and B->C, then C is transitively dependent on A via B (provided that A is not functionally dependent on C). In Our Problem : Emp Id Mgr Id Mgr Id Manager, Deppt, Deptt Id UNF Remove Repeating Groups 1NF Remove Functional Dependencies 2NF Remove Transitive Dependencies 3NF 11 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

12 Emp IdName 285Carl 365Jenny 458Jay 459Jeet 560Tina Emp IdChildren 285Bart 365Lina 458Divya 459Saumya 459Shalin 560Maggie 560Lisa Mgr IdManagerDepttDeptt Id 01SmithersFinance01F 02JoelIT01I 03MargareettHR01H Emp IdMgr Id 28501 36501 45802 45902 56003 Emp NameID Children Manager Entity Tuple Attributes 12 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

13 ID Name Children Manager Mgr Id Emp Id Name Emp Id Children Mgr Id Manager Deptt Deptt Id Emp IdMgr Id E – R Diagram 13 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN

14 Relationship In MS Access Primary Key Composite Key Tables Relationship 14 BY ILTAF MEHDI, MIHE, KART-I-PARWAN BRANCH, KABUL, AFGHANISTAN


Download ppt "1.  Database normalization is a design technique for structuring relational database tables.  More highly normalized tables reduce data duplication."

Similar presentations


Ads by Google