SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
Normalização


                   Normalização                                               Processo de estruturação de relações que é
                                                                              realizado para eliminar redundância e evitar
             E v e r s o n S a n t o s A r a u j o                            problemas com a manipulação dos dados
                e v e r s o n @ p o r . c o m . b r
                                                                              O problema da normalização foi então
                                                                              decomposto e nomeado como Formas
                                                                              Normais



                                                              http://ww.everson.com.br             2




                      Formas Normais                                              1ª Forma Normal
                São os passos necessários para normalização
                de um Banco de Dados

                Dividas em três fases:                                        Todos os atributos estão definidos em
                                                                              domínios com valores atômicos e
                    1ª Forma Normal
                                                                              monovalorados
                    2ª Forma Normal

                    3ª Forma Normal

http://ww.everson.com.br              3                       http://ww.everson.com.br             4
Não Normalizado                                                                                         1ª Forma Normal
                ENCOMENDAS (NumeroEncomenda,                                                                           ENCOMENDAS (NumeroEncomenda,
                Data, TaxaTransporte, ValorTotal, Cliente,                                                             Data, TaxaTransporte, ValorTotal, Cliente,
                Endereço, Produtos, ValorUnitario,                                                                     Endereço, Produto, ValorUnitario,
                Quantidades, TotalProdutos)                                                                            Quantidade, TotalProdutos)

                                                                                                         Numero       Data        TaxaT   ValorT Cliente       End      Prod     ValorU   Quant    Total
  Numero       Data        TaxaT   ValorT Cliente       End      Prods    ValorU     Quant    Total
                                                                                                             1      12/09/09 R$5,00 R$55,00 Everson Rua A              Caneta    R$1,00    10     R$10,00
                                                                Caneta.   R$ 1,00.
      1      12/09/09 R$5,00 R$55,00 Everson Rua A                                   10. 10 R$50,00
                                                                 Papel    R$ 4,00                            1      12/09/09 R$5,00 R$55,00 Everson Rua A              Papel     R$4,00    10     R$40,00

                                                                                                             2      12/09/09 R$5,00 R$25,00 Everson Rua A              Papel     R$4,00     5     R$20,00
      2      12/09/09 R$5,00 R$25,00 Everson Rua A               Papel    R$4,00       5     R$20,00
                                                                                                             3      13/09/09 R$3,00 R$35,00       João         Rua B   Livro A R$12,00      1     R$12,00
                                                                Livro A. R$12,00.
      3      13/09/09 R$3,00 R$35,00       João         Rua B                         1. 2   R$32,00
                                                                Livro B R$10,00                              3      13/09/09 R$3,00 R$35,00       João         Rua B   Livro B   R$10       2     R$20,00
http://ww.everson.com.br                            5                                                  http://ww.everson.com.br                            6




                    2ª Forma Normal                                                                                                 Dependência
                                                                                                                                     Funcional

                                                                                                                       Associação que se estabelece entre dois ou
                Todos os atributos dependem da chave
                                                                                                                       mais atributos, quando estes atributos
                primária através de uma dependência
                                                                                                                       identificam uma informação de modo unívoco
                funcional elementar
                                                                                                                       Identifica relações entre os dados de modo a
                Só é aplicada no caso de existência de mais de
                                                                                                                       delimitar a semântica dos atributos em um
                uma chave funcional
                                                                                                                       esquema específico


http://ww.everson.com.br                            7                                                  http://ww.everson.com.br                            8
Dependência                                                                            2ª Forma Normal
                                Funcional
                                                                                                                  ENCOMENDAS (NumeroEncomenda,
                                                                                                                  Data, TaxaTransporte, ValorTotal, Cliente,
                                                                                                                  Endereço)
                ENCOMENDAS (NumeroEncomenda,                                                                      DETALHES (NumeroEncomenda,
                Data, TaxaTransporte, ValorTotal, Cliente,                                                        CodigoProduto, Quantidade, TotalProdutos)
                Endereço, Produto, ValorUnitario,
                Quantidade, TotalProdutos)                                                                        PRODUTOS (CodigoProduto, Nome,
                                                                                                                  ValorUnitario)



http://ww.everson.com.br                            9                                             http://ww.everson.com.br            10




                    2ª Forma Normal                                                                                   3ª Forma Normal
                                          Encomendas
                    Numero      Data      TaxaT         ValorT        Cliente     End

                           1   12/09/09   R$5,00        R$55,00       Everson    Rua A

                           2   12/09/09   R$5,00        R$25,00       Everson    Rua A
                                                                                                                  Todos os atributos não-chave devem ser
                           3   13/09/09   R$3,00        R$35,00        João      Rua B                            mutuamente independentes

                       Detalhes                                               Produtos                            Atributos que não dependem da chave devem
   Numero       CodigoProduto Quant         Total        CodigoProduto          Nome     ValorU                   ser separados
       1                   1        10     R$10,00                1             Caneta   R$1,00

       1                   2        10     R$40,00                2              Papel   R$4,00

       2                   2         5     R$20,00
                                                                                                  http://ww.everson.com.br            12
3ª Forma Normal                                       3ª Forma Normal
                                                                             Encomendas                                              Clientes
                ENCOMENDAS (NumeroEncomenda,
                                                            Numero    Data          TaxaT    ValorT      CodCli      CodigoCliente     Nome      End
                Data, TaxaTransporte, ValorTotal,
                CodigoCliente)                                1      12/09/09       R$5,00   R$55,00           1             1        Everson   Rua A

                                                              2      12/09/09       R$5,00   R$25,00           1             2          João    Rua B
                CLIENTES (CodigoCliente, Nome,                3      13/09/09       R$3,00   R$35,00           2
                Endereço)
                                                                             Detalhes                                              Produtos
                DETALHES (NumeroEncomenda,                  Numero    CodigoProduto Quant              Total       CodigoProduto      Nome      ValorU
                CodigoProduto, Quantidade, TotalProdutos)
                                                               1                1            10    R$10,00               1            Caneta    R$1,00

                PRODUTOS (CodigoProduto, Nome,                 1                2            10    R$40,00               2            Papel     R$4,00

                ValorUnitario)                                 2                2            5     R$20,00
http://ww.everson.com.br           13

Contenu connexe

Dernier

Dernier (9)

Programação Orientada a Objetos - 4 Pilares.pdf
Programação Orientada a Objetos - 4 Pilares.pdfProgramação Orientada a Objetos - 4 Pilares.pdf
Programação Orientada a Objetos - 4 Pilares.pdf
 
Padrões de Projeto: Proxy e Command com exemplo
Padrões de Projeto: Proxy e Command com exemploPadrões de Projeto: Proxy e Command com exemplo
Padrões de Projeto: Proxy e Command com exemplo
 
ATIVIDADE 1 - SISTEMAS DISTRIBUÍDOS E REDES - 52_2024.docx
ATIVIDADE 1 - SISTEMAS DISTRIBUÍDOS E REDES - 52_2024.docxATIVIDADE 1 - SISTEMAS DISTRIBUÍDOS E REDES - 52_2024.docx
ATIVIDADE 1 - SISTEMAS DISTRIBUÍDOS E REDES - 52_2024.docx
 
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docxATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
ATIVIDADE 1 - CUSTOS DE PRODUÇÃO - 52_2024.docx
 
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docxATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
ATIVIDADE 1 - GCOM - GESTÃO DA INFORMAÇÃO - 54_2024.docx
 
Luís Kitota AWS Discovery Day Ka Solution.pdf
Luís Kitota AWS Discovery Day Ka Solution.pdfLuís Kitota AWS Discovery Day Ka Solution.pdf
Luís Kitota AWS Discovery Day Ka Solution.pdf
 
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docxATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
ATIVIDADE 1 - LOGÍSTICA EMPRESARIAL - 52_2024.docx
 
Boas práticas de programação com Object Calisthenics
Boas práticas de programação com Object CalisthenicsBoas práticas de programação com Object Calisthenics
Boas práticas de programação com Object Calisthenics
 
ATIVIDADE 1 - ESTRUTURA DE DADOS II - 52_2024.docx
ATIVIDADE 1 - ESTRUTURA DE DADOS II - 52_2024.docxATIVIDADE 1 - ESTRUTURA DE DADOS II - 52_2024.docx
ATIVIDADE 1 - ESTRUTURA DE DADOS II - 52_2024.docx
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Normalizacao -impressao

  • 1. Normalização Normalização Processo de estruturação de relações que é realizado para eliminar redundância e evitar E v e r s o n S a n t o s A r a u j o problemas com a manipulação dos dados e v e r s o n @ p o r . c o m . b r O problema da normalização foi então decomposto e nomeado como Formas Normais http://ww.everson.com.br 2 Formas Normais 1ª Forma Normal São os passos necessários para normalização de um Banco de Dados Dividas em três fases: Todos os atributos estão definidos em domínios com valores atômicos e 1ª Forma Normal monovalorados 2ª Forma Normal 3ª Forma Normal http://ww.everson.com.br 3 http://ww.everson.com.br 4
  • 2. Não Normalizado 1ª Forma Normal ENCOMENDAS (NumeroEncomenda, ENCOMENDAS (NumeroEncomenda, Data, TaxaTransporte, ValorTotal, Cliente, Data, TaxaTransporte, ValorTotal, Cliente, Endereço, Produtos, ValorUnitario, Endereço, Produto, ValorUnitario, Quantidades, TotalProdutos) Quantidade, TotalProdutos) Numero Data TaxaT ValorT Cliente End Prod ValorU Quant Total Numero Data TaxaT ValorT Cliente End Prods ValorU Quant Total 1 12/09/09 R$5,00 R$55,00 Everson Rua A Caneta R$1,00 10 R$10,00 Caneta. R$ 1,00. 1 12/09/09 R$5,00 R$55,00 Everson Rua A 10. 10 R$50,00 Papel R$ 4,00 1 12/09/09 R$5,00 R$55,00 Everson Rua A Papel R$4,00 10 R$40,00 2 12/09/09 R$5,00 R$25,00 Everson Rua A Papel R$4,00 5 R$20,00 2 12/09/09 R$5,00 R$25,00 Everson Rua A Papel R$4,00 5 R$20,00 3 13/09/09 R$3,00 R$35,00 João Rua B Livro A R$12,00 1 R$12,00 Livro A. R$12,00. 3 13/09/09 R$3,00 R$35,00 João Rua B 1. 2 R$32,00 Livro B R$10,00 3 13/09/09 R$3,00 R$35,00 João Rua B Livro B R$10 2 R$20,00 http://ww.everson.com.br 5 http://ww.everson.com.br 6 2ª Forma Normal Dependência Funcional Associação que se estabelece entre dois ou Todos os atributos dependem da chave mais atributos, quando estes atributos primária através de uma dependência identificam uma informação de modo unívoco funcional elementar Identifica relações entre os dados de modo a Só é aplicada no caso de existência de mais de delimitar a semântica dos atributos em um uma chave funcional esquema específico http://ww.everson.com.br 7 http://ww.everson.com.br 8
  • 3. Dependência 2ª Forma Normal Funcional ENCOMENDAS (NumeroEncomenda, Data, TaxaTransporte, ValorTotal, Cliente, Endereço) ENCOMENDAS (NumeroEncomenda, DETALHES (NumeroEncomenda, Data, TaxaTransporte, ValorTotal, Cliente, CodigoProduto, Quantidade, TotalProdutos) Endereço, Produto, ValorUnitario, Quantidade, TotalProdutos) PRODUTOS (CodigoProduto, Nome, ValorUnitario) http://ww.everson.com.br 9 http://ww.everson.com.br 10 2ª Forma Normal 3ª Forma Normal Encomendas Numero Data TaxaT ValorT Cliente End 1 12/09/09 R$5,00 R$55,00 Everson Rua A 2 12/09/09 R$5,00 R$25,00 Everson Rua A Todos os atributos não-chave devem ser 3 13/09/09 R$3,00 R$35,00 João Rua B mutuamente independentes Detalhes Produtos Atributos que não dependem da chave devem Numero CodigoProduto Quant Total CodigoProduto Nome ValorU ser separados 1 1 10 R$10,00 1 Caneta R$1,00 1 2 10 R$40,00 2 Papel R$4,00 2 2 5 R$20,00 http://ww.everson.com.br 12
  • 4. 3ª Forma Normal 3ª Forma Normal Encomendas Clientes ENCOMENDAS (NumeroEncomenda, Numero Data TaxaT ValorT CodCli CodigoCliente Nome End Data, TaxaTransporte, ValorTotal, CodigoCliente) 1 12/09/09 R$5,00 R$55,00 1 1 Everson Rua A 2 12/09/09 R$5,00 R$25,00 1 2 João Rua B CLIENTES (CodigoCliente, Nome, 3 13/09/09 R$3,00 R$35,00 2 Endereço) Detalhes Produtos DETALHES (NumeroEncomenda, Numero CodigoProduto Quant Total CodigoProduto Nome ValorU CodigoProduto, Quantidade, TotalProdutos) 1 1 10 R$10,00 1 Caneta R$1,00 PRODUTOS (CodigoProduto, Nome, 1 2 10 R$40,00 2 Papel R$4,00 ValorUnitario) 2 2 5 R$20,00 http://ww.everson.com.br 13