Results 1 to 3 of 3

Thread: Normalization

  1. #1
    Join Date
    Jun 2004

    Unanswered: Normalization

    HOw do we do Normalization In DB2.What is the use of it.
    Help is graetly apprecitaed.

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 1

    Normalization is database independent data modeling process. Data modeling should be independent of type of database: DB2, Oracle, SQL server, etc. The main purpose of normalization is to reduce data redundancy - one data should be written only onse.

    I sugest you to search the Google with search string: "database normalization".

    There is a simple SQL tutorial on web and it also describes the normalization process.
    From above link:

    ================================================== =======
    What is normalization?
    Normalization is a technique of database design that suggests that certain criteria be used when constructing a table layout (deciding what columns each table will have, and creating the key structure), where the idea is to eliminate redundancy of non-key data across tables.

    Normalization is usually referred to in terms of forms, and I will introduce only the first three, even though it is somewhat common to use other, more advanced forms (fourth, fifth, Boyce-Codd; see documentation).

    First Normal Form refers to moving data into separate tables where the data in each table is of a similar type, and by giving each table a primary key.

    Putting data in Second Normal Form involves removing to other tables data that is only dependent of a part of the key. For example, if I had left the names of the Antique Owners in the items table, that would not be in Second Normal Form because that data would be redundant; the name would be repeated for each item owned; as such, the names were placed in their own table. The names themselves don't have anything to do with the items, only the identities of the buyers and sellers.

    Third Normal Form involves getting rid of anything in the tables that doesn't depend solely on the primary key. Only include information that is dependent on the key, and move off data to other tables that are independent of the primary key, and create a primary key for the new tables. There is some redundancy to each form, and if data is in 3NF (shorthand for 3rd normal form), it is already in 1NF and 2NF. In terms of data design then, arrange data so that any non-primary key columns are dependent only on the whole primary key. If you take a look at the sample database, you will see that the way then to navigate through the database is through joins using common key columns.

    Two other important points in database design are using good, consistent, logical, full-word names for the tables and columns, and the use of full words in the database itself. On the last point, my database is lacking, as I use numeric codes for dentification. It is usually best, if possible, to come up with keys that are, by themselves, self-explanatory; for example, a better key would be the first four letters of the last name and first initial of the owner, like JONEB for Bill Jones (or for tiebreaking purposes, add numbers to the end to differentiate two or more people with similar names, so you could try JONEB1, JONEB2, etc.
    ================================================== =======

    Hope this helps,
    Last edited by grofaty; 07-08-04 at 04:05.

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    Quote Originally Posted by grofaty
    There is a simple SQL tutorial
    that's a pretty good tutorial, except it isn't really "on the web"

    it's on PDF

    PDFs are not web compatible, they are paper compatible

    PDF stands for "print da f*cker" because there's no way you can read most of them online

    anyhow, that particular sql tutorial was one of the first on the web, but the original was removed a few years ago and the author has disappeared

    there are many copies of it around, and you will occasionally see one where the author has warned people not to post copies on the web

    well, i'm glad they did, because with the original gone, the mirrors are all we have left

    here's one of the latest versions: | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts