Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Help with normalization

Help with normalization

Scheduled Pinned Locked Moved Database
help
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nebilo
    wrote on last edited by
    #1

    Hi all, I have a project that I'm going to do.There's a table that has to be normalized.I've tried the normalization roughly.But i need your solution just to check mine with yours.Here's the table with sample data. I hhave taken Pay Item as a primary key:

    Pay Item Description Bridge Type Span Unit Quantity
    81.02(a)-I Soft materials-0-2m Slab 6 m3 726.092
    81.02(a)-I Soft materials-0.2m Slab 8 m3 182.442
    81.02(a)-I Soft materials-0.2m Slab 10 m3 255.36
    81.02(a)-I Soft materials-0.2m T-Girder 12 m3 726.092
    81.02(a)-I Soft materials-0.2m T-Girder 14 m3 329.864
    81.02(a)-ii Soft materials Slab 6 m3 123.456
    81.02(a)-ii Soft materials Slab 8 m3 240.762
    81.02(a)-ii Soft materials T-Girder 12 m3 556.762
    81.02(a)-ii Soft materials T-Girder 14 m3 192.56

    G L M 3 Replies Last reply
    0
    • N Nebilo

      Hi all, I have a project that I'm going to do.There's a table that has to be normalized.I've tried the normalization roughly.But i need your solution just to check mine with yours.Here's the table with sample data. I hhave taken Pay Item as a primary key:

      Pay Item Description Bridge Type Span Unit Quantity
      81.02(a)-I Soft materials-0-2m Slab 6 m3 726.092
      81.02(a)-I Soft materials-0.2m Slab 8 m3 182.442
      81.02(a)-I Soft materials-0.2m Slab 10 m3 255.36
      81.02(a)-I Soft materials-0.2m T-Girder 12 m3 726.092
      81.02(a)-I Soft materials-0.2m T-Girder 14 m3 329.864
      81.02(a)-ii Soft materials Slab 6 m3 123.456
      81.02(a)-ii Soft materials Slab 8 m3 240.762
      81.02(a)-ii Soft materials T-Girder 12 m3 556.762
      81.02(a)-ii Soft materials T-Girder 14 m3 192.56

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      ah ... no - why dont you post what your table defs etc are - give it your best shot - else for all we know we could be doing your homework - and we dont do homework

      N 1 Reply Last reply
      0
      • N Nebilo

        Hi all, I have a project that I'm going to do.There's a table that has to be normalized.I've tried the normalization roughly.But i need your solution just to check mine with yours.Here's the table with sample data. I hhave taken Pay Item as a primary key:

        Pay Item Description Bridge Type Span Unit Quantity
        81.02(a)-I Soft materials-0-2m Slab 6 m3 726.092
        81.02(a)-I Soft materials-0.2m Slab 8 m3 182.442
        81.02(a)-I Soft materials-0.2m Slab 10 m3 255.36
        81.02(a)-I Soft materials-0.2m T-Girder 12 m3 726.092
        81.02(a)-I Soft materials-0.2m T-Girder 14 m3 329.864
        81.02(a)-ii Soft materials Slab 6 m3 123.456
        81.02(a)-ii Soft materials Slab 8 m3 240.762
        81.02(a)-ii Soft materials T-Girder 12 m3 556.762
        81.02(a)-ii Soft materials T-Girder 14 m3 192.56

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Nebilo wrote:

        I've tried the normalization roughly

        How? Doesn't look like it's in 1NF; the primary key isn't an atomic fact, and there are repeating groups.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        N 1 Reply Last reply
        0
        • N Nebilo

          Hi all, I have a project that I'm going to do.There's a table that has to be normalized.I've tried the normalization roughly.But i need your solution just to check mine with yours.Here's the table with sample data. I hhave taken Pay Item as a primary key:

          Pay Item Description Bridge Type Span Unit Quantity
          81.02(a)-I Soft materials-0-2m Slab 6 m3 726.092
          81.02(a)-I Soft materials-0.2m Slab 8 m3 182.442
          81.02(a)-I Soft materials-0.2m Slab 10 m3 255.36
          81.02(a)-I Soft materials-0.2m T-Girder 12 m3 726.092
          81.02(a)-I Soft materials-0.2m T-Girder 14 m3 329.864
          81.02(a)-ii Soft materials Slab 6 m3 123.456
          81.02(a)-ii Soft materials Slab 8 m3 240.762
          81.02(a)-ii Soft materials T-Girder 12 m3 556.762
          81.02(a)-ii Soft materials T-Girder 14 m3 192.56

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Pat Item, Bridge Typeand Unit should be split out as dimension tables.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • L Lost User

            Nebilo wrote:

            I've tried the normalization roughly

            How? Doesn't look like it's in 1NF; the primary key isn't an atomic fact, and there are repeating groups.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            N Offline
            N Offline
            Nebilo
            wrote on last edited by
            #5

            This is the original table,not the normalized one.

            Richard DeemingR 1 Reply Last reply
            0
            • G Garth J Lancaster

              ah ... no - why dont you post what your table defs etc are - give it your best shot - else for all we know we could be doing your homework - and we dont do homework

              N Offline
              N Offline
              Nebilo
              wrote on last edited by
              #6

              Let me show you my trial: First I put (PayItem,Description and unit)on a single table, Second (BridgeType,Span,quantity)on another table payitem as a foreign key. Now bridge type and span are making the redundancy problem,what should i do now?

              1 Reply Last reply
              0
              • N Nebilo

                This is the original table,not the normalized one.

                Richard DeemingR Offline
                Richard DeemingR Offline
                Richard Deeming
                wrote on last edited by
                #7

                Ah, the old "I've solved it, but I'm not going to show you; I want to see your solution first so I can check" line. Which translates as, "I haven't solved it; I want you to solve it for me".


                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                N 1 Reply Last reply
                0
                • Richard DeemingR Richard Deeming

                  Ah, the old "I've solved it, but I'm not going to show you; I want to see your solution first so I can check" line. Which translates as, "I haven't solved it; I want you to solve it for me".


                  "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                  N Offline
                  N Offline
                  Nebilo
                  wrote on last edited by
                  #8

                  Let me show you my trial: First I put (PayItem,Description and unit)on a single table, Second (BridgeType,Span,quantity)on another table payitem as a foreign key. Now bridge type and span are making the redundancy problem,what should i do now?

                  L 1 Reply Last reply
                  0
                  • N Nebilo

                    Let me show you my trial: First I put (PayItem,Description and unit)on a single table, Second (BridgeType,Span,quantity)on another table payitem as a foreign key. Now bridge type and span are making the redundancy problem,what should i do now?

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Nebilo wrote:

                    First I put (PayItem,Description and unit)on a single table,

                    Why? Normalization consists of a set of rules that one can apply, one after the other. As is, the table is in 0NF. A "normalized" model is usually in BCNF (3NF+). That means that one verifies the rules for each level. If you follow the rules (!) we'd get exactly the same model.

                    Nebilo wrote:

                    what should i do now?

                    Start at the wikipedia, and see how you can turn your pile of data into 1NF.

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups