3nf

Upload: rishi-jain

Post on 08-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 3NF

    1/18

    3NF

    The concept of database normalization was first

    introduced by Edgar Frank Codd in his paper A

    Relational Model of Data for Large Shared Data

    Banks,.

    Database normalization is a process by which an

    existing schema is modified to bring its

    component tables into compliance with a series

    of progressive normal forms

  • 8/6/2019 3NF

    2/18

    3NF

    The goal of database normalization is to ensure

    that every non-key column in every table is

    directly dependent on the key, the whole key

    and nothing but the key and with this goal come

    benefits in the form of reduced redundancies,

    fewer anomalies, and improved efficiencies.

  • 8/6/2019 3NF

    3/18

    3NF

    First Normal Form (1NF)

    The first normal form (1NF) sets the very crucial

    rule to create the database :

    1. There are no repeating or duplicate fields.

    2. Each cell contains only a single value.

    3. Each record is unique and identified by

    primary key.

  • 8/6/2019 3NF

    4/18

    3NF

    The normalization process involves getting our

    data to adjust in a progressive normal forms and

    you cannot achieve the higher level of

    normalization without satisfying the previous

    levels. The First Normal Form asking the values in

    each cell of a table must be atomic. The word

    atomic describes that there should be no sets ofvalues in one particular cell.

  • 8/6/2019 3NF

    5/18

    3NFLet's see the example below :

  • 8/6/2019 3NF

    6/18

    3NF

    This table is not in first normal form because :

    A. There are multiple fields in color lab.

    B. Records are repeating (Duplicate records)or no primary key.

  • 8/6/2019 3NF

    7/18

    3NF

  • 8/6/2019 3NF

    8/18

    3NF

    Second Normal Form (2NF)

    A table is said to be in 2NF if

    A. It should meet all the requirements of thefirst normal form.B. It should remove subsets of data that applyto multiple rows of a table and place them in

    separate tables.C. It create relationships between these newtables and their predecessors through the useof foreign keys.

  • 8/6/2019 3NF

    9/18

    3NF

    The First Normal form deals with the atomicity

    whereas the Second Normal Form deals with the

    relationship between the composite key columns

    and non-key columns. To achieve the next

    progressive level your table should satisfy the

    requirement of First Normal Form then move

    towards the Second Normal Form.

  • 8/6/2019 3NF

    10/18

    3NF

  • 8/6/2019 3NF

    11/18

    3NF

    Table is not in Second Normal Form because the

    price and tax depends on the item, but not

    color.

  • 8/6/2019 3NF

    12/18

    3NFTh

    ird Normal Form (1NF)The Third Normal Form has one more additional

    requirement :

    A. It should meet all the requirements of the second

    normal form.B. It should remove columns that are not

    dependent upon the primary key.

    In the Third Normal Form all columns depend upon theprimary key. When one column depends upon the

    other column, table break the rule and turns into the

    dependency on the primary key.

  • 8/6/2019 3NF

    13/18

    3NF

  • 8/6/2019 3NF

    14/18

    3NF

  • 8/6/2019 3NF

    15/18

    3NF

  • 8/6/2019 3NF

    16/18

    3NF

  • 8/6/2019 3NF

    17/18

    3NF

  • 8/6/2019 3NF

    18/18

    3NF