SlideShare uma empresa Scribd logo
1 de 16
Normalizing and Denormalizing Data

Objectives
In this lesson, you will learn to:
 Describe data redundancy
 Describe the first, second, and third normal forms
 Describe the Boyce-Codd Normal Form (BCNF)
 Appreciate the need for denormalization




©NIIT                                       RDBMS/Lesson 3/Slide 1 of 16
Normalizing and Denormalizing Data

Understanding Data Redundancy
 Redundancy means repetition of data
 Redundancy increases the time involved in updating, adding,
  and deleting data
 It also increases the utilization of disk space and hence, disk
  I/O increases




©NIIT                                       RDBMS/Lesson 3/Slide 2 of 16
Normalizing and Denormalizing Data

Understanding Data Redundancy (Contd.)
 Redundancy can lead to the following problems:
     Update anomalies—Inserting, modifying, and deleting
      data may cause inconsistencies
     Inconsistencies—Errors are more likely to occur when
      facts are repeated
     Unnecessary utilization of extra disk space




©NIIT                                      RDBMS/Lesson 3/Slide 3 of 16
Normalizing and Denormalizing Data

Definition of Normalization
 Normalization is a scientific method of breaking down
  complex table structures into simple table structures by
  using certain rules
 It allows you to reduce redundancy in a table and eliminate
  the problems of inconsistency and disk space usage
 Normalization results in the formation of tables that satisfy
  certain specified rules and represent certain normal forms




©NIIT                                       RDBMS/Lesson 3/Slide 4 of 16
Normalizing and Denormalizing Data

Normal Forms
 The most important and widely used normal forms are:
     First Normal Form (1 NF)
     Second Normal Form (2 NF)
     Third Normal Form (3 NF)
     Boyce Codd Normal Form (BCNF)




©NIIT                                   RDBMS/Lesson 3/Slide 5 of 16
Normalizing and Denormalizing Data

First Normal Form
 A table is said to be in the 1 NF when each cell of the table
  contains precisely one value
 Functional Dependency
     The normalization theory is based on the fundamental
      notion of functional dependency
     Given a relation R, attribute A is functionally dependent
      on attribute B if each value of A in R is associated with
      precisely one value of B




©NIIT                                       RDBMS/Lesson 3/Slide 6 of 16
Normalizing and Denormalizing Data

Second Normal Form (2NF)
 A table is said to be in 2 NF when it is in 1 NF and every
  attribute in the row is functionally dependent upon the whole
  key, and not just part of the key
 To ensure that a table is in 2 NF, you should:
     Find and remove attributes that are functionally
      dependent on only a part of the key and not on the whole
      key and place them in a different table
     Group the remaining attributes




©NIIT                                      RDBMS/Lesson 3/Slide 7 of 16
Normalizing and Denormalizing Data

Third Normal Form (3NF)
 A relation is said to be in 3 NF when it is in 2 NF and every
  non-key attribute is functionally dependent only on the
  primary key
 To ensure that a table is in 3 NF, you should:
     Find and remove non-key attributes that are functionally
      dependent on attributes that are not the primary key and
      place them in a different table
     Group the remaining attributes




©NIIT                                       RDBMS/Lesson 3/Slide 8 of 16
Normalizing and Denormalizing Data

Boyce-Codd Normal Form
 The original definition of 3NF was inadequate in some
  situations
 It was not satisfactory for the tables:
    that had multiple candidate keys
    where the multiple candidate keys were composite
    where the multiple candidate keys overlapped
 Therefore, a new normal form—the Boyce-Codd Normal
  Form (BCNF) was introduced
    A relation is in the Boyce-Codd normal form (BCNF) if
      and only if every determinant is a candidate key



©NIIT                                     RDBMS/Lesson 3/Slide 9 of 16
Normalizing and Denormalizing Data

Boyce-Codd Normal Form (Contd.)
 In order to ensure that a table is in BCNF, you should:
    Find and remove the overlapping candidate keys
    Place the part of the candidate key and the attribute it is
     functionally dependent on, in a different table
    Group the remaining items into a table




©NIIT                                      RDBMS/Lesson 3/Slide 10 of 16
Normalizing and Denormalizing Data

Just a Minute...
 You have received a proposed table structure for the table
  Position. After testing the table structure with some data, you
  find that there is a problem in inserting, deleting, and
  modifying data. You will notice that the table structure could
  lead to inconsistency in data and will also occupy a lot of
  disk space.
  Modify the table structure to optimize data storage.




©NIIT                                      RDBMS/Lesson 3/Slide 11 of 16
Normalizing and Denormalizing Data

Understanding Denormalization
 The end product of normalization is a set of related tables
  that comprise the database
 However, in the interests of speed of response to critical
  queries, which demand information from more than one
  table, it is sometimes wiser to introduce a degree of
  redundancy in tables
 The intentional introduction of redundancy in a table to
  improve performance is called denormalization




©NIIT                                      RDBMS/Lesson 3/Slide 12 of 16
Normalizing and Denormalizing Data

Just a Minute…
 In the reporting system, the total amount paid to a contract
  recruiter is often required. The required result can be
  calculated using the two tables - ContractRecruiter and
  Payment. Since the size of the Payment table is large, the join
  between the two tables takes time to generate the required
  output. It is, therefore, necessary to improve the performance
  of this query.




©NIIT                                     RDBMS/Lesson 3/Slide 13 of 16
Normalizing and Denormalizing Data

Just a Minute…
 Each time the salary slip for an employee is generated, the
  referral bonus (if present) has to be calculated and printed in
  the salary slip. The following three tables are used for this
  query- MonthlySalary, Employee, and EmployeeReferrals.
  However, since the table structures are large, it is necessary
  to improve the performance of this query by modifying the
  table structures.




©NIIT                                      RDBMS/Lesson 3/Slide 14 of 16
Normalizing and Denormalizing Data

Summary
In this lesson, you learned that:
 Normalization is used to simplify table structures.
 Normalization results in the formation of tables that satisfy
  certain specified constraints, and represent certain normal
  forms. The normal forms are used to ensure that various
  types of anomalies and inconsistencies are not introduced in
  the database. A table structure is always in a certain normal
  form. Several normal forms have been identified.




©NIIT                                      RDBMS/Lesson 3/Slide 15 of 16
Normalizing and Denormalizing Data

Summary (Contd.)
 The most important and widely used of these are:
     First Normal Form (1NF)
     Second Normal Form (2 NF)
     Third Normal Form (3 NF)
     Boyce Codd Normal Form (BCNF)
 The intentional introduction of redundancy in a table in order
  to improve performance is called denormalization.
 The decision to denormalize results in a trade-off between
  performance and data integrity.
 Denormalization increases disk space utilization.


©NIIT                                      RDBMS/Lesson 3/Slide 16 of 16

Mais conteúdo relacionado

Mais procurados

Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal formcollege
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Acceptedprasaddurga
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Farhan Chishti
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalizationSulman Ahmed
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i iGagan Deep
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwalanerudhbalaji
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationNickkisha Farrell
 
Entity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalizationEntity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalizationSatya Pal
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Normalization in relational database management systems
Normalization in relational database management systemsNormalization in relational database management systems
Normalization in relational database management systemsPreethi T G
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 

Mais procurados (20)

Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 
Normalization in databases
Normalization in databasesNormalization in databases
Normalization in databases
 
Normalization
NormalizationNormalization
Normalization
 
Normalization case
Normalization caseNormalization case
Normalization case
 
Normalization,ddl,dml,dcl
Normalization,ddl,dml,dclNormalization,ddl,dml,dcl
Normalization,ddl,dml,dcl
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Accepted
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalization
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i i
 
Bcnf
BcnfBcnf
Bcnf
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
Entity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalizationEntity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalization
 
Database
DatabaseDatabase
Database
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Normlaization
NormlaizationNormlaization
Normlaization
 
Normalization
NormalizationNormalization
Normalization
 
Normalization in relational database management systems
Normalization in relational database management systemsNormalization in relational database management systems
Normalization in relational database management systems
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Functions of dbms
Functions  of dbmsFunctions  of dbms
Functions of dbms
 

Semelhante a Rdbms xp 03

03 rdbms session03
03 rdbms session0303 rdbms session03
03 rdbms session03Niit Care
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesnsrChowdary1
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Dave Stokes
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzzmuzzii27
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptxkshipra sony
 
CIS 515 discussion post responses.There are two discussions he.docx
CIS 515 discussion post responses.There are two discussions he.docxCIS 515 discussion post responses.There are two discussions he.docx
CIS 515 discussion post responses.There are two discussions he.docxsleeperharwell
 
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxNormalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxSIR RIP .NET
 
Chapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxChapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxhaymanot taddesse
 
Master of Computer Application (MCA) – Semester 4 MC0077
Master of Computer Application (MCA) – Semester 4  MC0077Master of Computer Application (MCA) – Semester 4  MC0077
Master of Computer Application (MCA) – Semester 4 MC0077Aravind NC
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Processmussawir20
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems incMuthu Natarajan
 

Semelhante a Rdbms xp 03 (20)

03 rdbms session03
03 rdbms session0303 rdbms session03
03 rdbms session03
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its types
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
normaliztion
normaliztionnormaliztion
normaliztion
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Research gadot
Research gadotResearch gadot
Research gadot
 
Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzz
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
CIS 515 discussion post responses.There are two discussions he.docx
CIS 515 discussion post responses.There are two discussions he.docxCIS 515 discussion post responses.There are two discussions he.docx
CIS 515 discussion post responses.There are two discussions he.docx
 
Normalization,ddl,dml,dcl
Normalization,ddl,dml,dclNormalization,ddl,dml,dcl
Normalization,ddl,dml,dcl
 
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxNormalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
 
Chapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxChapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptx
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Master of Computer Application (MCA) – Semester 4 MC0077
Master of Computer Application (MCA) – Semester 4  MC0077Master of Computer Application (MCA) – Semester 4  MC0077
Master of Computer Application (MCA) – Semester 4 MC0077
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
James hall ch 9
James hall ch 9James hall ch 9
James hall ch 9
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Database Normalization.pptx
Database Normalization.pptxDatabase Normalization.pptx
Database Normalization.pptx
 

Mais de Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Último

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Rdbms xp 03

  • 1. Normalizing and Denormalizing Data Objectives In this lesson, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form (BCNF) Appreciate the need for denormalization ©NIIT RDBMS/Lesson 3/Slide 1 of 16
  • 2. Normalizing and Denormalizing Data Understanding Data Redundancy Redundancy means repetition of data Redundancy increases the time involved in updating, adding, and deleting data It also increases the utilization of disk space and hence, disk I/O increases ©NIIT RDBMS/Lesson 3/Slide 2 of 16
  • 3. Normalizing and Denormalizing Data Understanding Data Redundancy (Contd.) Redundancy can lead to the following problems: Update anomalies—Inserting, modifying, and deleting data may cause inconsistencies Inconsistencies—Errors are more likely to occur when facts are repeated Unnecessary utilization of extra disk space ©NIIT RDBMS/Lesson 3/Slide 3 of 16
  • 4. Normalizing and Denormalizing Data Definition of Normalization Normalization is a scientific method of breaking down complex table structures into simple table structures by using certain rules It allows you to reduce redundancy in a table and eliminate the problems of inconsistency and disk space usage Normalization results in the formation of tables that satisfy certain specified rules and represent certain normal forms ©NIIT RDBMS/Lesson 3/Slide 4 of 16
  • 5. Normalizing and Denormalizing Data Normal Forms The most important and widely used normal forms are: First Normal Form (1 NF) Second Normal Form (2 NF) Third Normal Form (3 NF) Boyce Codd Normal Form (BCNF) ©NIIT RDBMS/Lesson 3/Slide 5 of 16
  • 6. Normalizing and Denormalizing Data First Normal Form A table is said to be in the 1 NF when each cell of the table contains precisely one value Functional Dependency The normalization theory is based on the fundamental notion of functional dependency Given a relation R, attribute A is functionally dependent on attribute B if each value of A in R is associated with precisely one value of B ©NIIT RDBMS/Lesson 3/Slide 6 of 16
  • 7. Normalizing and Denormalizing Data Second Normal Form (2NF) A table is said to be in 2 NF when it is in 1 NF and every attribute in the row is functionally dependent upon the whole key, and not just part of the key To ensure that a table is in 2 NF, you should: Find and remove attributes that are functionally dependent on only a part of the key and not on the whole key and place them in a different table Group the remaining attributes ©NIIT RDBMS/Lesson 3/Slide 7 of 16
  • 8. Normalizing and Denormalizing Data Third Normal Form (3NF) A relation is said to be in 3 NF when it is in 2 NF and every non-key attribute is functionally dependent only on the primary key To ensure that a table is in 3 NF, you should: Find and remove non-key attributes that are functionally dependent on attributes that are not the primary key and place them in a different table Group the remaining attributes ©NIIT RDBMS/Lesson 3/Slide 8 of 16
  • 9. Normalizing and Denormalizing Data Boyce-Codd Normal Form The original definition of 3NF was inadequate in some situations It was not satisfactory for the tables: that had multiple candidate keys where the multiple candidate keys were composite where the multiple candidate keys overlapped Therefore, a new normal form—the Boyce-Codd Normal Form (BCNF) was introduced A relation is in the Boyce-Codd normal form (BCNF) if and only if every determinant is a candidate key ©NIIT RDBMS/Lesson 3/Slide 9 of 16
  • 10. Normalizing and Denormalizing Data Boyce-Codd Normal Form (Contd.) In order to ensure that a table is in BCNF, you should: Find and remove the overlapping candidate keys Place the part of the candidate key and the attribute it is functionally dependent on, in a different table Group the remaining items into a table ©NIIT RDBMS/Lesson 3/Slide 10 of 16
  • 11. Normalizing and Denormalizing Data Just a Minute... You have received a proposed table structure for the table Position. After testing the table structure with some data, you find that there is a problem in inserting, deleting, and modifying data. You will notice that the table structure could lead to inconsistency in data and will also occupy a lot of disk space. Modify the table structure to optimize data storage. ©NIIT RDBMS/Lesson 3/Slide 11 of 16
  • 12. Normalizing and Denormalizing Data Understanding Denormalization The end product of normalization is a set of related tables that comprise the database However, in the interests of speed of response to critical queries, which demand information from more than one table, it is sometimes wiser to introduce a degree of redundancy in tables The intentional introduction of redundancy in a table to improve performance is called denormalization ©NIIT RDBMS/Lesson 3/Slide 12 of 16
  • 13. Normalizing and Denormalizing Data Just a Minute… In the reporting system, the total amount paid to a contract recruiter is often required. The required result can be calculated using the two tables - ContractRecruiter and Payment. Since the size of the Payment table is large, the join between the two tables takes time to generate the required output. It is, therefore, necessary to improve the performance of this query. ©NIIT RDBMS/Lesson 3/Slide 13 of 16
  • 14. Normalizing and Denormalizing Data Just a Minute… Each time the salary slip for an employee is generated, the referral bonus (if present) has to be calculated and printed in the salary slip. The following three tables are used for this query- MonthlySalary, Employee, and EmployeeReferrals. However, since the table structures are large, it is necessary to improve the performance of this query by modifying the table structures. ©NIIT RDBMS/Lesson 3/Slide 14 of 16
  • 15. Normalizing and Denormalizing Data Summary In this lesson, you learned that: Normalization is used to simplify table structures. Normalization results in the formation of tables that satisfy certain specified constraints, and represent certain normal forms. The normal forms are used to ensure that various types of anomalies and inconsistencies are not introduced in the database. A table structure is always in a certain normal form. Several normal forms have been identified. ©NIIT RDBMS/Lesson 3/Slide 15 of 16
  • 16. Normalizing and Denormalizing Data Summary (Contd.) The most important and widely used of these are: First Normal Form (1NF) Second Normal Form (2 NF) Third Normal Form (3 NF) Boyce Codd Normal Form (BCNF) The intentional introduction of redundancy in a table in order to improve performance is called denormalization. The decision to denormalize results in a trade-off between performance and data integrity. Denormalization increases disk space utilization. ©NIIT RDBMS/Lesson 3/Slide 16 of 16