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. The Lounge
  3. Why oh why database

Why oh why database

Scheduled Pinned Locked Moved The Lounge
databasesql-serverdesignhelptutorial
12 Posts 11 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.
  • V Offline
    V Offline
    virang_21
    wrote on last edited by
    #1

    I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

    Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

    C N W F T 8 Replies Last reply
    0
    • V virang_21

      I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

      Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

      C Offline
      C Offline
      clientSurfer
      wrote on last edited by
      #2

      Yeah I see the reasoning behind the uber-generic CRM database structures but they sure are a big huge giant steaming pile of a pain in the @ss to work with...

      "... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute  "...who gives a tinker's cuss?" - Dalek Dave  "Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon

      L 1 Reply Last reply
      0
      • V virang_21

        I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

        Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

        N Offline
        N Offline
        Nagy Vilmos
        wrote on last edited by
        #3

        I think the normal solution here is a shallow grave in the woods for whoever write this in the first place. :suss:


        Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

        1 Reply Last reply
        0
        • V virang_21

          I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

          Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

          W Offline
          W Offline
          W Balboos GHB
          wrote on last edited by
          #4

          It appears that the ominous future I perceived for framework-generated databases is worse than I thought and to be feared. A rewrite of a project is imminent - and the databases are to be reorganized to better accommodate the reality of how the application is used. The 'inventor and manager' wants to use a framework to create and manage the dbase, not minding at all if it makes hundreds of tables. I think we should make a human-designed database so that humans can grasp its design. He says any queries, etc., will be generated by the framework. I say we'd be trapped, perhaps permanently, behind a wall of complexity interpretable only by a specific framework. You can add something of a ditto, by the way, for code generation. I realize his framework infatuation will allow for faster development (at least initially). But the lack of control and hideous dependence, and thus restrictions likely to be imposed upon migration are, in my opinion, not worth the price. Is thre a proper middle ground, or should I just lock him in a closet until it's too late for imposition of frameworks?

          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

          "As far as we know, our computer has never had an undetected error." - Weisert

          "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

          D 1 Reply Last reply
          0
          • V virang_21

            I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

            Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

            F Offline
            F Offline
            Fabio Franco
            wrote on last edited by
            #5

            virang_21 wrote:

            Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+

            You should take a look at Baan platform. Imagine that but with 1000+ tables, you have no idea what hell is like.

            "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson

            1 Reply Last reply
            0
            • V virang_21

              I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

              Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

              T Offline
              T Offline
              T M Gray
              wrote on last edited by
              #6

              Usually that kind of column naming is to handle customization. Depending on each implementation those fields might mean different things for different customers. Not every company would use a CRM system to track Orders. So LongValue7 being OrderNumber would make no sense for those customers. So are you updating the description of each column in MSSQL as you figure out what it is? That way you can have database diagrams that show you somethnig meaningful.

              V 1 Reply Last reply
              0
              • V virang_21

                I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

                Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

                R Offline
                R Offline
                rnbergren
                wrote on last edited by
                #7

                wow, Is the person who designed the database is her name Lucy? I remember my first job out of college was working on a team with another newbie programer and the "experienced" Russian Lady. Lucy. She named all her varaibles var1, var2, var3, int1, int2 int3, textfield1, textfield2 and the database was just as you described. It was the worst thing in the world. Oh and she had GOTO statements in the code at various places. It was enough to make one throw up a bit in their mouth. To this day naming something lucycode is the worst insult I can give it.

                To err is human to really mess up you need a computer

                1 Reply Last reply
                0
                • V virang_21

                  I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

                  Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

                  V Offline
                  V Offline
                  vinayvraman
                  wrote on last edited by
                  #8

                  Kudos to the original developer/db designer.. he has obfuscated the db columns so that nobody understands it without chanting some mantras..:-D

                  1 Reply Last reply
                  0
                  • W W Balboos GHB

                    It appears that the ominous future I perceived for framework-generated databases is worse than I thought and to be feared. A rewrite of a project is imminent - and the databases are to be reorganized to better accommodate the reality of how the application is used. The 'inventor and manager' wants to use a framework to create and manage the dbase, not minding at all if it makes hundreds of tables. I think we should make a human-designed database so that humans can grasp its design. He says any queries, etc., will be generated by the framework. I say we'd be trapped, perhaps permanently, behind a wall of complexity interpretable only by a specific framework. You can add something of a ditto, by the way, for code generation. I realize his framework infatuation will allow for faster development (at least initially). But the lack of control and hideous dependence, and thus restrictions likely to be imposed upon migration are, in my opinion, not worth the price. Is thre a proper middle ground, or should I just lock him in a closet until it's too late for imposition of frameworks?

                    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                    "As far as we know, our computer has never had an undetected error." - Weisert

                    "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                    D Offline
                    D Offline
                    djdanlib 0
                    wrote on last edited by
                    #9

                    Go with the closet one.

                    1 Reply Last reply
                    0
                    • V virang_21

                      I am currently working on a CRM system that I have to add features to. It has a MSSQL database and it is used by just one application but the database structure is so "futuristic" I am having a real hard time dealing with it. Here is one table called Project which has columns like Character1, Character2... Character10, LongValue1, LongValue2..., FloatValue1.... Total tables in database : 50+ The real deal is to find out which field maps to which frontend field. For example , LongValue7 is OrderNumber .... Why on earth not call it OrderNumber in the table itself.. why ????? There are at least 3-4 triggers per table... (Big design fail !!! ).... Time to time it fails and my next task will be to get rid of as many triggers as possible and move it to stored proc and add error handling routines to it...it is a winform app at the moment but company wants web app that acts the same as winform app and sooner or later I have to do that too... I am happy that I have 2 other wonderful projects to work on at the moment but this one is real pain....

                      Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

                      F Offline
                      F Offline
                      Florin Jurcovici 0
                      wrote on last edited by
                      #10

                      Does LasagnaCode ring a bell?

                      1 Reply Last reply
                      0
                      • T T M Gray

                        Usually that kind of column naming is to handle customization. Depending on each implementation those fields might mean different things for different customers. Not every company would use a CRM system to track Orders. So LongValue7 being OrderNumber would make no sense for those customers. So are you updating the description of each column in MSSQL as you figure out what it is? That way you can have database diagrams that show you somethnig meaningful.

                        V Offline
                        V Offline
                        virang_21
                        wrote on last edited by
                        #11

                        It is a blackbox system for me as no source code is available for CRM. I have to develop other supporting systems around it which uses those core CRM tables.Things is this CRM talks to AS400 based another system and gets some tables updated via processes that runs periodically but time to time those processes fail no one knows why and what went wrong as most of those updates are done via triggers and my job is to make error trapping mechanism and reporting systems around it so someone can check audit tables I am creating and make changes to actual data to make it work.

                        Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.

                        1 Reply Last reply
                        0
                        • C clientSurfer

                          Yeah I see the reasoning behind the uber-generic CRM database structures but they sure are a big huge giant steaming pile of a pain in the @ss to work with...

                          "... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute  "...who gives a tinker's cuss?" - Dalek Dave  "Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon

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

                          No pain - no gain - rewrite it from the ground up (in a perfect world...) since you'll be going from windows forms app to a web app anyways.

                          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