Normalization in sql

Embed Size (px)

Citation preview

  • 7/30/2019 Normalization in sql

    1/2

    Normalization in sql

    Rajat vats

    BCA, School of Ccomputer Application

    Lovely Professional University,Jalandhar

    I. INTRODUCTION (NORMALIZATION IN SQL)

    Normalization is the process of restructuring the logical data

    model of a database to eliminate redundancy, organize dataefficiently and reduce repeating data and to reduce the potential

    for anomalies during data operations.

    Data normalization also may improve data consistency and

    simplify future extension of the logical data model.The formal classifications used for describing a relational

    database's level of normalization are called normal forms .

    I. WHAT HAPPENS WITHOUT NORMALIZATION?

    A non-normalized database may store data

    representing a particular referent in multiple locations.

    An update to such data in some but not all of thoselocations results in an update anomaly, yielding

    inconsistent data. A normalized database preventssuch an anomaly by storing such data in only one

    location.

    Similarly, such dependencies in non-normalized

    databases can hinder deletion. That is, deleting data

    from such databases may require deleting data fromthe inappropriate dependency. A normalized database

    prevents such deletion anomalies by ensuring that allrecords are uniquely identifiable and contain no

    extraneous information.

    It can creates error .

    II. FORMS IN NORMALIZATION IN SQL.

    Normal Forms:

    The first normal form requires that tables be

    made up of a primary key and a number of atomic fields, andthe second and third deal with the relationship of non-key

    fields to the primary key.

    These have been summarized as requiring that all non-key

    fields be dependent on the key, the whole key and nothing butthe key.

    First Normal Form

    First normal form lays the groundwork for an organized

    database design: Ensure that each table has a primary key:minimal set of attributes which can uniquely identify a record

    Second Normal Form

    Second normal form If a table has a composite key, allattributes must be related to the whole key:

    The database must meet all the requirements of the first normalform

    Third Normal Form

    Third normal form requires that data stored in a table be

    dependent only on the primary key, and not on any other fieldin the table. The database must meet all the requirements of thesecond normal form.

    Boyce-Codd Normal Form

    Boyce-Codd normal form requires that there be no non-trivial

    functional dependencies of attributes on something other than asuperset of a candidate key (called a superkey)

    Fifth Normal Form

    Fifth normal form requires that there are no non-trivial joindependencies that do not follow from the key constraints. A

    table is said to be in the 5NF if and only if it is in 4NF andevery join dependency in it is implied by the candidate keys.

    Sixth Normal Form

    This normal form was, as of 2005, only recently proposed: thesixth normal form was only defined when extending the

    relational model to take into account the temporal dimension .

    Unfortunately, most current SQL technologies as of 2005

    do not take into account this work, and most temporalextensions to SQL are not relational.

    II.NORMALIZATIONINSQLFIGURE

    figure1:sql

  • 7/30/2019 Normalization in sql

    2/2

    Figur2:no

    rmalization in sql

    III. ADVANTAGESOFNORMALIZATIONINSQL

    The main advantage of normalisation is that it helps toreduce redundancy..

    Normalization increase granularity and Granularity is the

    scope of a definition for any particular thing.

    maintain data intergrity, and make the data model as simpleas possible.

    Expandability: normalized data are less diskspace usage,better maintainability and expandability and betterperformances.

    Local autonomy: The normalization is brought nearer to

    its users. This can effect a cultural change as it allowspotentially greater control over local data .

    A. Disadvantages:

    a. Architectural complexity.

    b. Cost.

    c. Security.

    d. Reduced Efficiency

    e. Strucutural Disadvantages

    f. Lack of experience.

    g. Database design more complex.

    A.

    IV. ACKNOWLEDGMENT

    I sincerely thank to my project guide Mrs Supreet Thapar,School of Computer Application Lovely Professional

    University, Punjab for guidance and encouragement in carryingout this project work I also wish to express my gratitude to the

    my seniors and colleagues who rendered their help during theperiod of my project work. I wish to avail myself of this

    opportunity, express a sense of gratitude and love to my friendsand my beloved parents for their manual support, strength, help

    and for everything

    Place: Jalandhar

    V. REFERENCES

    a. Google

    b. Wikipedia

    c. Database pdf

    d. Power point presentation

    e. Teachers help

    f. Teacher notes

    g. Senior helps

    .