SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Relational Database Exercises

          John Cutajar
First Normal Form
 Which rule does this table violate?
 Change the following table in 1NF




                          Databases     2
First Normal Form

 No repeating groups. As an example, it might be
  tempting to make an invoice table with columns for
  the first, second, and third line item (see above).
  This violates the first normal form, and would result
  in large rows, wasted space (where an invoice had
  less than the maximum number of line items), and
  *horrible* SQL statements with a separate join for
  each repetition of the column. First form
  normalization requires you make a separate line item
  table, with it's own key (in this case the combination
  of invoice number and line number)
                        Databases                          3
From 1NF to 2NF
 Why not in 2NF: Now convert to 2NF




                       Databases       4
Second Normal Form

 Each column must depend on the *entire*
  primary key. As an example, the customer
  information could be put in the line item table
  (previous slide). The trouble with that is that the
  customer goes with the invoice, not with each line on
  the invoice. Putting customer information in the line
  item table will cause redundant data, with it's inherant
  overhead and difficult modifications. Second form
  normalization requires you place the customer
  information in the invoice table.

                          Databases                          5
From 2NF to 3NF
 Why not in 3NF: Now convert to 3NF




                       Databases       6
Third Normal Form

 Each column must depend on *directly* on the
  primary key. As an example, the customer address
  could go in the invoice table (previous slide), but this
  would cause data redundancy if several invoices were
  for the same customer. It would also cause an
  update nightmare when the customer changes his
  address, and would require extensive programming
  to insert the address every time an existing customer
  gets a new invoice. Third form normalization requires
  the customer address go in a separate customer
  table with its own key (customer), with only the
  customer identifier in the invoice table.
                         Databases                           7
From 2NF to 3NF
 Now in 3NF




                 Databases       8
First Normal Form

 Which rule does                    Members List
  this table violate?   1 John Cutajar Access, DB2, FoxPro
 Change the            2 Paul Borg      dBase, Clipper
  following table in    3 Mary Hanks
  1NF                   4 Joe Doe        DB2, Oracle
                        5 Tim Rice       Oracle, Sybase
                        6 Paul Simon     Informix
                        7 Ned Blue
                        8 Sam Red        Access, MySQL
                        9 Tina Skoss

                        Databases                            9
From 1NF to 2NF

 Now to 2NF                                    Database Table
                                          MID    DID   Database
          Members Table
                                          1      1     Access
      MID      Member                     1      2     DB2
      1      John Cutajar                 1      3     FoxPro
      2      Paul Borg                    2      4     dBase

      3      Mary Hanks                   2      5     Clipper

      4      Joe Doe                      4      2     DB2
                                          4      6     Oracle
      5      Tim Rice
                                          5      6     Oracle
      6      Paul Simon
                                          5      7     Sybase
      7      Ned Blue
                                          6      8     Informix
      8      Sam Red
                                          8      1     Access
      9      Tina Skoss                   8      2     MySQL



                              Databases                           10
From 2NF to 3NF

 Now in 3NF                    Database
                                 Table
         Members Table
                               MID   DID   Database Table
     MID      Member
                               1     1     DID   Database
     1      John Cutajar       1     2     1     Access
     2      Paul Borg          1     3     2     DB2
     3      Mary Hanks         2     4     3     FoxPro
     4      Joe Doe            2     5     4     dBase
     5      Tim Rice           4     2     5     Clipper
     6      Paul Simon         4     6     6     Oracle
                               5     6     7     Sybase
     7      Ned Blue
                               5     7     8     Informix
     8      Sam Red
                               6     8     9     MySQL
     9      Tina Skoss
                               8     1
                               8     9

                             Databases                      11

Mais conteúdo relacionado

Mais procurados

Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFBiplap Bhattarai
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATIONbit allahabad
 
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
 
Database normalization
Database normalizationDatabase normalization
Database normalizationJignesh Jain
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Vidyasagar Mundroy
 
Normalization
NormalizationNormalization
Normalizationochesing
 
Rdbms chapter 4
Rdbms chapter 4Rdbms chapter 4
Rdbms chapter 4Monu Kumar
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a DatabaseBishrul Haq
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecturesontumax
 
Database basics
Database basicsDatabase basics
Database basicsprachin514
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of NormalizationShwe Yee
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksBigClasses Com
 
What is difference between dbms and rdbms
What is difference between dbms and rdbmsWhat is difference between dbms and rdbms
What is difference between dbms and rdbmsAfrasiyab Haider
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 

Mais procurados (20)

Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normal forms
Normal formsNormal forms
Normal forms
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
 
Normalization
NormalizationNormalization
Normalization
 
Rdbms chapter 4
Rdbms chapter 4Rdbms chapter 4
Rdbms chapter 4
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
Data Flow Diagram
Data Flow DiagramData Flow Diagram
Data Flow Diagram
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecture
 
Database basics
Database basicsDatabase basics
Database basics
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of Normalization
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata Works
 
What is difference between dbms and rdbms
What is difference between dbms and rdbmsWhat is difference between dbms and rdbms
What is difference between dbms and rdbms
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 

Destaque

Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOSuite Solutions
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearchingGopi Saiteja
 
Intermediate Operating Systems
Intermediate Operating SystemsIntermediate Operating Systems
Intermediate Operating SystemsJohn Cutajar
 
Intermediate machine architecture
Intermediate machine architectureIntermediate machine architecture
Intermediate machine architectureJohn Cutajar
 
Assembly language 8086 intermediate
Assembly language 8086 intermediateAssembly language 8086 intermediate
Assembly language 8086 intermediateJohn Cutajar
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersAbdul Rahman Sherzad
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationEhsan Hamzei
 
Binary search
Binary search Binary search
Binary search Raghu nath
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tablesDhani Ahmad
 

Destaque (20)

Database normalization
Database normalizationDatabase normalization
Database normalization
 
Otbi overview ow13
Otbi overview ow13Otbi overview ow13
Otbi overview ow13
 
Databases
DatabasesDatabases
Databases
 
Relational
RelationalRelational
Relational
 
SImple SQL
SImple SQLSImple SQL
SImple SQL
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FO
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
 
Intermediate Operating Systems
Intermediate Operating SystemsIntermediate Operating Systems
Intermediate Operating Systems
 
Javanotes
JavanotesJavanotes
Javanotes
 
System design
System designSystem design
System design
 
Module 5 2010
Module 5 2010Module 5 2010
Module 5 2010
 
Intermediate machine architecture
Intermediate machine architectureIntermediate machine architecture
Intermediate machine architecture
 
Oop principles
Oop principlesOop principles
Oop principles
 
Assembly language 8086 intermediate
Assembly language 8086 intermediateAssembly language 8086 intermediate
Assembly language 8086 intermediate
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Binary search
Binary search Binary search
Binary search
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
 

Semelhante a Relational Database Examples

Advanced Normalization
Advanced NormalizationAdvanced Normalization
Advanced NormalizationAbdullah Khosa
 
Hadoop hbase mapreduce
Hadoop hbase mapreduceHadoop hbase mapreduce
Hadoop hbase mapreduceFARUK BERKSÖZ
 
MySQL Cluster Product Overview - by Wagner Bianchi Jr
MySQL Cluster Product Overview - by Wagner Bianchi JrMySQL Cluster Product Overview - by Wagner Bianchi Jr
MySQL Cluster Product Overview - by Wagner Bianchi JrMySQL Brasil
 
MySQL Cluster Product Overview
MySQL Cluster Product OverviewMySQL Cluster Product Overview
MySQL Cluster Product OverviewWagner Bianchi
 
"Mobage DBA Fight against Big Data" - NHN TE
"Mobage DBA Fight against Big Data" - NHN TE"Mobage DBA Fight against Big Data" - NHN TE
"Mobage DBA Fight against Big Data" - NHN TERyosuke IWANAGA
 
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
 
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...DataWorks Summit
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structureZhichao Liang
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesSean Chittenden
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationdmcfarlane
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: RenormalizeAriel Weil
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: RenormalizeAriel Weil
 
Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Uwe Printz
 
Chapter 5 - Normalization of Database Tables.pdf
Chapter 5 - Normalization of Database Tables.pdfChapter 5 - Normalization of Database Tables.pdf
Chapter 5 - Normalization of Database Tables.pdfJervinCagaananSapidR
 
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simon
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer SimonDocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simon
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simonlucenerevolution
 
Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Lucidworks (Archived)
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalizationSulman Ahmed
 

Semelhante a Relational Database Examples (20)

Advanced Normalization
Advanced NormalizationAdvanced Normalization
Advanced Normalization
 
Hadoop hbase mapreduce
Hadoop hbase mapreduceHadoop hbase mapreduce
Hadoop hbase mapreduce
 
MySQL Cluster Product Overview - by Wagner Bianchi Jr
MySQL Cluster Product Overview - by Wagner Bianchi JrMySQL Cluster Product Overview - by Wagner Bianchi Jr
MySQL Cluster Product Overview - by Wagner Bianchi Jr
 
MySQL Cluster Product Overview
MySQL Cluster Product OverviewMySQL Cluster Product Overview
MySQL Cluster Product Overview
 
NOSQL Overview
NOSQL OverviewNOSQL Overview
NOSQL Overview
 
"Mobage DBA Fight against Big Data" - NHN TE
"Mobage DBA Fight against Big Data" - NHN TE"Mobage DBA Fight against Big Data" - NHN TE
"Mobage DBA Fight against Big Data" - NHN TE
 
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
 
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...
Losing Data in a Safe Way – Advanced Replication Strategies in Apache Hadoop ...
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structure
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practices
 
Bigtable and Dynamo
Bigtable and DynamoBigtable and Dynamo
Bigtable and Dynamo
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalization
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: Renormalize
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: Renormalize
 
Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?
 
Chapter 5 - Normalization of Database Tables.pdf
Chapter 5 - Normalization of Database Tables.pdfChapter 5 - Normalization of Database Tables.pdf
Chapter 5 - Normalization of Database Tables.pdf
 
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simon
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer SimonDocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simon
DocValues aka. Column Stride Fields in Lucene 4.0 - By Willnauer Simon
 
Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValuesColumn Stride Fields aka. DocValues
Column Stride Fields aka. DocValues
 
Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues Column Stride Fields aka. DocValues
Column Stride Fields aka. DocValues
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalization
 

Último

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Último (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Relational Database Examples

  • 2. First Normal Form  Which rule does this table violate?  Change the following table in 1NF Databases 2
  • 3. First Normal Form  No repeating groups. As an example, it might be tempting to make an invoice table with columns for the first, second, and third line item (see above). This violates the first normal form, and would result in large rows, wasted space (where an invoice had less than the maximum number of line items), and *horrible* SQL statements with a separate join for each repetition of the column. First form normalization requires you make a separate line item table, with it's own key (in this case the combination of invoice number and line number) Databases 3
  • 4. From 1NF to 2NF  Why not in 2NF: Now convert to 2NF Databases 4
  • 5. Second Normal Form  Each column must depend on the *entire* primary key. As an example, the customer information could be put in the line item table (previous slide). The trouble with that is that the customer goes with the invoice, not with each line on the invoice. Putting customer information in the line item table will cause redundant data, with it's inherant overhead and difficult modifications. Second form normalization requires you place the customer information in the invoice table. Databases 5
  • 6. From 2NF to 3NF  Why not in 3NF: Now convert to 3NF Databases 6
  • 7. Third Normal Form  Each column must depend on *directly* on the primary key. As an example, the customer address could go in the invoice table (previous slide), but this would cause data redundancy if several invoices were for the same customer. It would also cause an update nightmare when the customer changes his address, and would require extensive programming to insert the address every time an existing customer gets a new invoice. Third form normalization requires the customer address go in a separate customer table with its own key (customer), with only the customer identifier in the invoice table. Databases 7
  • 8. From 2NF to 3NF  Now in 3NF Databases 8
  • 9. First Normal Form  Which rule does Members List this table violate? 1 John Cutajar Access, DB2, FoxPro  Change the 2 Paul Borg dBase, Clipper following table in 3 Mary Hanks 1NF 4 Joe Doe DB2, Oracle 5 Tim Rice Oracle, Sybase 6 Paul Simon Informix 7 Ned Blue 8 Sam Red Access, MySQL 9 Tina Skoss Databases 9
  • 10. From 1NF to 2NF  Now to 2NF Database Table MID DID Database Members Table 1 1 Access MID Member 1 2 DB2 1 John Cutajar 1 3 FoxPro 2 Paul Borg 2 4 dBase 3 Mary Hanks 2 5 Clipper 4 Joe Doe 4 2 DB2 4 6 Oracle 5 Tim Rice 5 6 Oracle 6 Paul Simon 5 7 Sybase 7 Ned Blue 6 8 Informix 8 Sam Red 8 1 Access 9 Tina Skoss 8 2 MySQL Databases 10
  • 11. From 2NF to 3NF  Now in 3NF Database Table Members Table MID DID Database Table MID Member 1 1 DID Database 1 John Cutajar 1 2 1 Access 2 Paul Borg 1 3 2 DB2 3 Mary Hanks 2 4 3 FoxPro 4 Joe Doe 2 5 4 dBase 5 Tim Rice 4 2 5 Clipper 6 Paul Simon 4 6 6 Oracle 5 6 7 Sybase 7 Ned Blue 5 7 8 Informix 8 Sam Red 6 8 9 MySQL 9 Tina Skoss 8 1 8 9 Databases 11