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. Other Discussions
  3. The Back Room
  4. Nice SQL Table, nice kitty

Nice SQL Table, nice kitty

Scheduled Pinned Locked Moved The Back Room
csharpdatabasecomquestion
29 Posts 16 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.
  • P Paul Watson

    *sigh*[^] Guess what I am doing...

    Paul Watson
    Bluegrass
    Cape Town, South Africa

    My humble photographic tribute to our world[^]

    M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #4

    Let's see. Fixing all those "allow nulls". Making it more generic (what is all this 1, 2, 3...15 sh*t anyways), which of course involves lots of SQL procedures Adding primary keys Discovering multiple rows for the same primary key Adding indexing Discovering nulls, duplicate data, and different data types on indexed columns Adding referential integrity Discovering just how broken the DB schema is as a result of referential integrity you just added. And finally... Discovering just how f****ed you are by this project. Working with a database is iterative, like sex, but painful instead of pleasurable. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
    Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
    Every line of code is a liability - Taka Muraoka

    P 1 Reply Last reply
    0
    • M Marc Clifton

      Let's see. Fixing all those "allow nulls". Making it more generic (what is all this 1, 2, 3...15 sh*t anyways), which of course involves lots of SQL procedures Adding primary keys Discovering multiple rows for the same primary key Adding indexing Discovering nulls, duplicate data, and different data types on indexed columns Adding referential integrity Discovering just how broken the DB schema is as a result of referential integrity you just added. And finally... Discovering just how f****ed you are by this project. Working with a database is iterative, like sex, but painful instead of pleasurable. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
      Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
      Every line of code is a liability - Taka Muraoka

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #5

      Marc Clifton wrote: Discovering just how f****ed you are by this project. Especially when one realises there are fifty other tables just like this one... :| I especially hate the Allow Nulls bit. That drives me absolutely batty. The boss was angry a deadline slipped because he had to explain it to a client. I very simply went back in my email archives to three months ago and re-sent an email saying "If we develop this new project with this existing site then we will not meet our deadlines. Recommend redev of db." But oh no, clients know better and bosses listen to clients :)

      Paul Watson
      Bluegrass
      Cape Town, South Africa

      My humble photographic tribute to our world[^]

      M 1 Reply Last reply
      0
      • P Paul Watson

        Marc Clifton wrote: Discovering just how f****ed you are by this project. Especially when one realises there are fifty other tables just like this one... :| I especially hate the Allow Nulls bit. That drives me absolutely batty. The boss was angry a deadline slipped because he had to explain it to a client. I very simply went back in my email archives to three months ago and re-sent an email saying "If we develop this new project with this existing site then we will not meet our deadlines. Recommend redev of db." But oh no, clients know better and bosses listen to clients :)

        Paul Watson
        Bluegrass
        Cape Town, South Africa

        My humble photographic tribute to our world[^]

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #6

        Especially when one realises there are fifty other tables just like this one... Yes, that's the iteration element. You fix one, you have to fix them all. Sucks, doesn't it? The boss was angry a deadline slipped because he had to explain it to a client. I was going to add that as another side-effect. Discovering your project is now going to miss all deadlines, all worst-case deadlines, all drop-dead deadlines, all really, really, this is it deadlines... But oh no, clients know better and bosses listen to clients And nobody listens to the professionals that they hired to actually do the work. Why is that??? Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
        Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
        Every line of code is a liability - Taka Muraoka

        1 Reply Last reply
        0
        • P Paul Watson

          *sigh*[^] Guess what I am doing...

          Paul Watson
          Bluegrass
          Cape Town, South Africa

          My humble photographic tribute to our world[^]

          J Offline
          J Offline
          Jon Sagara
          wrote on last edited by
          #7

          :omg: Ooooohhhh baby. Sux to be you. My sympathies. Jon Sagara Working with a database is iterative, like sex, but painful instead of pleasurable. -- Marc Clifton[^]

          1 Reply Last reply
          0
          • P Paul Watson

            *sigh*[^] Guess what I am doing...

            Paul Watson
            Bluegrass
            Cape Town, South Africa

            My humble photographic tribute to our world[^]

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #8

            I've seen worse. :(( -- Only in a world this shitty could you even try to say these were innocent people and keep a straight face.

            1 Reply Last reply
            0
            • P Paul Watson

              *sigh*[^] Guess what I am doing...

              Paul Watson
              Bluegrass
              Cape Town, South Africa

              My humble photographic tribute to our world[^]

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #9

              Ouch Looks like you'll be normalizing that one for a while. Let me guess, 50 is the default value for a nvarchar field. Michael You gotta roll with it You gotta take your time You gotta say what you say Don't let anybody get in your way - Oasis

              P 1 Reply Last reply
              0
              • M Michael P Butler

                Ouch Looks like you'll be normalizing that one for a while. Let me guess, 50 is the default value for a nvarchar field. Michael You gotta roll with it You gotta take your time You gotta say what you say Don't let anybody get in your way - Oasis

                P Offline
                P Offline
                Paul Watson
                wrote on last edited by
                #10

                Michael P Butler wrote: Looks like you'll be normalizing that one for a while. Let me guess, 50 is the default value for a nvarchar field. Indeed, and on a field which contains country names which can be longer than 50 characters... so when I do matching I have to make sure it recognises cut off country names as well. :| Another fun bit is that to indicate a boolean the chap used an int. The bad bit in this is initially 1 was true and 2 was false. Then someone else came along and said 0 was true and 1 was false. Just try explaining to the client that this means there is no hope in hell of figuring out some of the records. Weeeeee! Butler, bring me a double whiskey please. :-D

                Paul Watson
                Bluegrass
                Cape Town, South Africa

                My humble photographic tribute to our world[^]

                D 1 Reply Last reply
                0
                • P Paul Watson

                  Michael P Butler wrote: Looks like you'll be normalizing that one for a while. Let me guess, 50 is the default value for a nvarchar field. Indeed, and on a field which contains country names which can be longer than 50 characters... so when I do matching I have to make sure it recognises cut off country names as well. :| Another fun bit is that to indicate a boolean the chap used an int. The bad bit in this is initially 1 was true and 2 was false. Then someone else came along and said 0 was true and 1 was false. Just try explaining to the client that this means there is no hope in hell of figuring out some of the records. Weeeeee! Butler, bring me a double whiskey please. :-D

                  Paul Watson
                  Bluegrass
                  Cape Town, South Africa

                  My humble photographic tribute to our world[^]

                  D Offline
                  D Offline
                  David Wulff
                  wrote on last edited by
                  #11

                  Paul Watson wrote: The bad bit in this is initially 1 was true and 2 was false. Then someone else came along and said 0 was true and 1 was false. Good grief man!!! What the ... oh my! EAK! :eek: I'm sorry, I need more... :omg: :wtf: :omg: :wtf: :omg: :wtf: :omg: :wtf: :wtf: :omg: :omg: :omg: :omg: :omg: :wtf: :wtf: Eak!!


                  David Wulff http://www.davidwulff.co.uk

                  S 1 Reply Last reply
                  0
                  • P Paul Watson

                    *sigh*[^] Guess what I am doing...

                    Paul Watson
                    Bluegrass
                    Cape Town, South Africa

                    My humble photographic tribute to our world[^]

                    C Offline
                    C Offline
                    Chris Austin
                    wrote on last edited by
                    #12

                    :omg: Fill me with your knowledge, your wisdom, your coffee.

                    1 Reply Last reply
                    0
                    • P Paul Watson

                      *sigh*[^] Guess what I am doing...

                      Paul Watson
                      Bluegrass
                      Cape Town, South Africa

                      My humble photographic tribute to our world[^]

                      P Offline
                      P Offline
                      peterchen
                      wrote on last edited by
                      #13

                      :ouch: Paul Watson wrote: Guess what I am doing... umm... designing the perfect example for bad table design? :cool:


                      Those who not hear the music think the dancers are mad.  [sighist] [Agile]

                      1 Reply Last reply
                      0
                      • P Paul Watson

                        David Wulff wrote: Seriously reconsidering the meaning of life? More like the life of the chap who made this table *dot, dot, dot* :laugh:

                        Paul Watson
                        Bluegrass
                        Cape Town, South Africa

                        My humble photographic tribute to our world[^]

                        P Offline
                        P Offline
                        peterchen
                        wrote on last edited by
                        #14

                        clever you!


                        Those who not hear the music think the dancers are mad.  [sighist] [Agile]

                        1 Reply Last reply
                        0
                        • D David Wulff

                          Paul Watson wrote: The bad bit in this is initially 1 was true and 2 was false. Then someone else came along and said 0 was true and 1 was false. Good grief man!!! What the ... oh my! EAK! :eek: I'm sorry, I need more... :omg: :wtf: :omg: :wtf: :omg: :wtf: :omg: :wtf: :wtf: :omg: :omg: :omg: :omg: :omg: :wtf: :wtf: Eak!!


                          David Wulff http://www.davidwulff.co.uk

                          S Offline
                          S Offline
                          Shog9 0
                          wrote on last edited by
                          #15

                          David, that was a really fucked-up story - don't be stingy with the :omg:s now!

                          ---

                          Shog9 The siren sings a lonely song - of all the wants and hungers The lust of love a brute desire - the ledge of life goes under

                          1 Reply Last reply
                          0
                          • P Paul Watson

                            *sigh*[^] Guess what I am doing...

                            Paul Watson
                            Bluegrass
                            Cape Town, South Africa

                            My humble photographic tribute to our world[^]

                            N Offline
                            N Offline
                            Nick Seng
                            wrote on last edited by
                            #16

                            If you think you have it bad... My company uses tables with 300+ fields, and it just gets larger and larger with time. Apparently this people haven't heard of normalisation. Grrrr :Misery Loves Company: X| X| Notorious SMC


                            The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                            Get your facts first, and then you can distort them as much as you please Mark Twain

                            M R P 3 Replies Last reply
                            0
                            • N Nick Seng

                              If you think you have it bad... My company uses tables with 300+ fields, and it just gets larger and larger with time. Apparently this people haven't heard of normalisation. Grrrr :Misery Loves Company: X| X| Notorious SMC


                              The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                              Get your facts first, and then you can distort them as much as you please Mark Twain

                              M Offline
                              M Offline
                              MS le Roux
                              wrote on last edited by
                              #17

                              And here I was thinking that one of our tables that contains 70 columns is impressively bad.

                              N 1 Reply Last reply
                              0
                              • M MS le Roux

                                And here I was thinking that one of our tables that contains 70 columns is impressively bad.

                                N Offline
                                N Offline
                                Nick Seng
                                wrote on last edited by
                                #18

                                I think ours started that way too, but along the process, the programmers started to add columns that were already there, bu they were too lazy to find.:mad: Notorious SMC


                                The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                Get your facts first, and then you can distort them as much as you please Mark Twain

                                1 Reply Last reply
                                0
                                • N Nick Seng

                                  If you think you have it bad... My company uses tables with 300+ fields, and it just gets larger and larger with time. Apparently this people haven't heard of normalisation. Grrrr :Misery Loves Company: X| X| Notorious SMC


                                  The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                  Get your facts first, and then you can distort them as much as you please Mark Twain

                                  R Offline
                                  R Offline
                                  Roger Wright
                                  wrote on last edited by
                                  #19

                                  Notorious SMC wrote: The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain Get your facts first, and then you can distort them as much as you please Mark Twain God made a jackass for practice, then He made a school board. Samuel Clemens "How many times do I have to flush before you go away?" - Megan Forbes, on Management (12/5/2002)

                                  N 1 Reply Last reply
                                  0
                                  • R Roger Wright

                                    Notorious SMC wrote: The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain Get your facts first, and then you can distort them as much as you please Mark Twain God made a jackass for practice, then He made a school board. Samuel Clemens "How many times do I have to flush before you go away?" - Megan Forbes, on Management (12/5/2002)

                                    N Offline
                                    N Offline
                                    Nick Seng
                                    wrote on last edited by
                                    #20

                                    Roger Wright wrote: God made a jackass for practice, then He made a school board. Samuel Clemens Mark Twain fan ? ;) Notorious SMC


                                    The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                    Get your facts first, and then you can distort them as much as you please Mark Twain

                                    R 1 Reply Last reply
                                    0
                                    • N Nick Seng

                                      If you think you have it bad... My company uses tables with 300+ fields, and it just gets larger and larger with time. Apparently this people haven't heard of normalisation. Grrrr :Misery Loves Company: X| X| Notorious SMC


                                      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                      Get your facts first, and then you can distort them as much as you please Mark Twain

                                      P Offline
                                      P Offline
                                      Paul Watson
                                      wrote on last edited by
                                      #21

                                      Notorious SMC wrote: My company uses tables with 300+ fields :eek: X| Must be fun writing stored procedures for those tables :-D 300 parameters later I would be ready to skin a cat with a pickle brush.

                                      Paul Watson
                                      Bluegrass
                                      Cape Town, South Africa

                                      My humble photographic tribute to our world[^]

                                      N 1 Reply Last reply
                                      0
                                      • P Paul Watson

                                        Notorious SMC wrote: My company uses tables with 300+ fields :eek: X| Must be fun writing stored procedures for those tables :-D 300 parameters later I would be ready to skin a cat with a pickle brush.

                                        Paul Watson
                                        Bluegrass
                                        Cape Town, South Africa

                                        My humble photographic tribute to our world[^]

                                        N Offline
                                        N Offline
                                        Nick Seng
                                        wrote on last edited by
                                        #22

                                        I might have been exagerating a bit....It's just 2-4 tables that has 300+ fields, the rest have a more manageble fields of about 100 ;P Anyway, I'm the R&D department now, so I don't have to ever look at those database again!! :jig: ~life is good :)~ Notorious SMC


                                        The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
                                        Get your facts first, and then you can distort them as much as you please Mark Twain

                                        1 Reply Last reply
                                        0
                                        • P Paul Watson

                                          *sigh*[^] Guess what I am doing...

                                          Paul Watson
                                          Bluegrass
                                          Cape Town, South Africa

                                          My humble photographic tribute to our world[^]

                                          S Offline
                                          S Offline
                                          SimonS
                                          wrote on last edited by
                                          #23

                                          The worse that I've seen is char 10's being used as a PK for no reason other than "we've always done it this way" and some rilly, rilly clever individual spending the day working out a practical use for his sort-by-guid stored procedure. Run, RUN! Cheers, Simon "The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
                                          my svg article

                                          P 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