How to normalize a table with duplicated data and empty fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FKlusmann
    New Member
    • Mar 2010
    • 3

    #1

    How to normalize a table with duplicated data and empty fields

    I have inherited a big, messy table with duplicated data and empty fields consisting of Names (business, client, supplier, etc.), Addresses ( physical, mailing, shipping, billing), Orders ( Date, item, quantity, price, shippedby, shipdate, shipcost), etc..

    I wish to "normalize" this without loosing data.

    MainTable.ID -> NamesTable (NameID, NameType, LName, FName, etc....)
    -> AddressTable (AddressID, Type, Line1, Line2, Suite/Box, ....)
    -> OdrersTable (OrderID, Item, Qty, Price, ShipFactor, ....)
    -> more

    Please direct me to a step - by step work flow of how to dissect a messy table into normalized tables without loosing data of its correct relationships.

    Thank you!
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2433

    #2
    First here's a primer to database normalization


    Second, you'll have to provide db structures so members can help you out.
    niheel @ bytes

    Comment

    • FKlusmann
      New Member
      • Mar 2010
      • 3

      #3
      Thank you for your reply.

      I have read Mary's post and believe that I understand the concept.

      My Goal is:
      Table t_Addresses
      AddressID AutoNumber
      MasterID long, default Null lookup to MasterTable.Mas terID
      StreetNbr

      Comment

      • FKlusmann
        New Member
        • Mar 2010
        • 3

        #4
        Thank you for your reply.

        I have read Mary's post and believe that I understand the concept.

        My Goal is to make Table t_Addresses (test table has 610 records) w fields:
        AddressID AutoNumber
        MasterID long, default Null look-up to t_MasterTable.M asterID
        StreetNbr text
        StDirectionID long, default Null look-up to t_StDirections. StDirectionID
        StreetName text
        StreetTypeID long, default Null look-up to t_StreetTypes.S treetTypeID
        SuiteID long, default Null look-up to t_Suites.SuiteI D
        CityID long, default Null look-up to t_Cities.CityID
        (more)

        And Tables, such as t_StDirections (there are about 19 unique directions)

        StDirectionID long, look-up from t_Addresses.StD irectionID
        StDirection text (ie. N NW W SW S Oeste Sur ....)

        And Tables, such as t_StTypes (there are about 35 unique types)

        StreetTypeID long, look-up from t_Addresses.Str eetTypeID
        StreetType text (Ave, Rd, Ln, Hwy, US 1, etc.)

        My Starting Point is Table t_AddressesFrom Query (614 records some records do not have addresses) with fields:

        ID AutoNumber, PK
        AddressType text (ie. business, home, ship to, POBox, billing, ..)
        StreetNbr text
        StDirection text (ie. N S E W NW ...)
        StreetName text
        StreetType text (ie. Rd., St., Ave, Hwy. ...)
        Suite text (ie. 101-A, Suite C, 3rd Floor, ...)
        AddAdditional text (ie. rear, Bld.#3, ....)
        City text (ie. Portland, Los Angles, ...)
        State text (ie. CA, OR, OT ....)
        ZipCode text
        ZipExtension text
        Country text (ie. US, CA, PR, PUR, ...)

        I'd like suggestions on how to break out t_Addresses.StD irection into t_StDirections.

        Thanks.

        Comment

        Working...