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. database hell

database hell

Scheduled Pinned Locked Moved The Lounge
csharpphpdatabasehelpquestion
37 Posts 24 Posters 39 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.
  • A AndyInUK

    dawmail333 wrote:

    Talk about crappy. I only have read-only access too...

    hahah that's mad. I was complaining with 47 columns and you are dealing with 60 - oh god. To be honest the task that am doing is only 1 week job in .NET and it has already taken 2.5 weeks and still not finished because first of all i need to understand the logic of the crap code plus then i have to force myself to write crap code..lol..and list goes on.. 3 months and then done with PHP forever.

    D Offline
    D Offline
    dawmail333
    wrote on last edited by
    #25

    I think I forgot to mention that there are over 200 tables in the database. That + no documentation took a hell of a lot of time to find the relevant info... X|

    Posted from SPARTA!!!!!!!!!! 2.0. Don't forget to rate my post if it helped! ;)

    R J 2 Replies Last reply
    0
    • D dawmail333

      I think I forgot to mention that there are over 200 tables in the database. That + no documentation took a hell of a lot of time to find the relevant info... X|

      Posted from SPARTA!!!!!!!!!! 2.0. Don't forget to rate my post if it helped! ;)

      R Offline
      R Offline
      rurouniRonin
      wrote on last edited by
      #26

      The best part about that is it is a very common occurrence and always will be ;) Don't worry though, there is almost always gonna be someone else out there dealing with even worse :3 Sometimes the things you see will scare you or otherwise simply shock you but at the end of the day it's part of the job and you will do what you can to make things better. Plus they give us a chance to compare war stories so why not!?! ;)

      1 Reply Last reply
      0
      • E edmurphy99

        One table? That is not a database that is a spreadsheet

        A Offline
        A Offline
        Andreas Mertens
        wrote on last edited by
        #27

        Reminds me of a contract I did some years ago. This large facility was monitoring all the utility meters (water, gas, electricity) for the various spaces leased out. The asked me to upgrade it for them, etc. Turns out that they were tracking everything in a single page of a Lotus Symphony spreadsheet. And there was no rhyme or reason to the layout. Blocks of data were in various (unaligned) sections spread out all over the single spreadsheet page. And they all had these circular references within and between each of these blocks. It was like one huge amorphous state machine. And no one there understood anymore what the heck it did. I tried to clean it up. First thing I did was port it to Excel (they were amazed one could do even that), and then started trying to put all these blobs of data into separate spread sheet pages, trying to rationalize what was going on. I had hoped to convert this eventually into a database (one of the requests was to better analyze historical data, which was difficult with various copies of the spreadsheet - one for each months worth of data). Eventually the client dropped the project. They couldn't understand why I was spending all this time on back-end work - they wanted to see the pretty UI stuff first, and couldn't understand that it would be the data that would be driving the UI to a large degree, so it would be important to understand that first. These things happen. Mind you, this was in my early contracting days, and I hadn't learned the skills to keep the customer happy while still trying to produce a useful product for them. Andreas Mertens

        1 Reply Last reply
        0
        • R rurouniRonin

          Some languages are just more resistant to sloppy coding (like where type safety is strictly enforced, etc.) but VB(6) and PHP are by no means weak or bad languages and they each have their pros and cons depending on the situation. The only reason people perceive them as such is because (as has been mentioned in earlier posts) they are easy to learn and very flexible so unskilled devs often get their hands on them and do terrible, terrible things! When you see what skilled developers can do with these languages you will be amazed at how powerful they really are. Be proud of being a VB dev (hopefully in VB.NET since VB6 is slowly disappearing) and ignore people who knock the language. After all, being a developer has nothing to do with syntax.

          M Offline
          M Offline
          mathomp3
          wrote on last edited by
          #28

          The main problem with php and the reason you see bad database design associated with it is the "ad-hoc" nature of it. You want to do some feature / function no problem just slap it randomly anywhere in the code, and I mean anywhere really annoying in PHP. Oh and just throw something in the database randomly as well to store it. no problem, usually just append a column to the current table. Ok done, you can now store sub category into the database. problem solved. Oh wait sub categories need to be user editable. But only admin, now things start failing cause they just hard coded the values at the time. The database wasn't rationally built to handle it, and now you either rewrite the database breaking code all over or try to dynamically write the list. It's the do it at any time and it works method of PHP that is a problem. I have seen horrors of spagetti code in PHP. At least with .net there is a set struture, and while the developer has many options interfaces, classes, methods, etc its structured to the point I just click goto code and it can find it, and the debugger provides valid information. LOL VB6 is what caused people to dislike VB. A super easy language to learn / use that got the job done. Just not done right, and had no thoughts of being upgradeable / expandable. VB.net is no where the same language as VB6 just got screwed by same "last name" like how your cousin is a redneck, and people wonder if all your family is cause of same last name. Granted seems MS and .net have started to force vb.net out of existance by providing C# with more features and functions. VB.net programming is where I started, and while I have left it for C# I could go back to it and be ok, well I would have to turn off the semi-colon key and forget what brackets mean, but I would survive. Programming is an art, everyone can finger paint (PHP/VB) but not every can oil paint(.net c++, etc). Does that mean someone can't make a perfect piece of art with finger paint? No they can, it just means on average finger painting will look like crap. Same situation with programming.

          1 Reply Last reply
          0
          • A AndyInUK

            Hi All, I had to move from .NET to PHP for a bit and now the system am working on is one hell. They have a table with around 47-50 columns. It's not at all normalized and everything is in one table. Now am re-developing registration process and it's a nightmare to update each column. Is it common practice in PHP ? The problem is i know its crap and i still have to work on the existing system. :(

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

            I started to mess w/PHP a few months ago - when I started to update a website I inherited from pure HTML to javascript + php . Admittedly, it was so I didn't go totally mad doing just html (and a CSS here and there). Historical regression: FORTRAN -> C -> Vax Assembler -> C++ -> .NET allowed in, along with LINQ From here, going on to C# was to be readable to other users of C#. Let me give you some psychological balm: PHP looks a lot like C, except it's not too fussy about types. Like playing pool volleyball on a vacation in CanCun, it's a matter of attitude, to wit: Sure, you can play better volleyball when you're sober, but you're having fun doing it drunk - Carpe Diem ! So just consider your current state as a light-hearted romp. Embrace the moment for what it is. Oh - yeah - before I forget: Just one more thing. Find out who created that database atrocity and step on their neck.

            "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 dissappointment. If you are searching for perfection in yourself, then you seek failure." - Balboos HaGadol Mar 2010

            1 Reply Last reply
            0
            • A AndyInUK

              Hi All, I had to move from .NET to PHP for a bit and now the system am working on is one hell. They have a table with around 47-50 columns. It's not at all normalized and everything is in one table. Now am re-developing registration process and it's a nightmare to update each column. Is it common practice in PHP ? The problem is i know its crap and i still have to work on the existing system. :(

              J Offline
              J Offline
              Jasmine2501
              wrote on last edited by
              #30

              This is usually a management problem. Go ask the developers how the system ended up the way it is, and I bet they will tell you one of two things - "we didn't have enough time to do it right" or "we didn't have enough money to do it right" - both of those are management issues. It would be pretty rare for you to ask that question and have the developers say "we didn't do it right because we are incompetent"

              1 Reply Last reply
              0
              • D dawmail333

                I think I forgot to mention that there are over 200 tables in the database. That + no documentation took a hell of a lot of time to find the relevant info... X|

                Posted from SPARTA!!!!!!!!!! 2.0. Don't forget to rate my post if it helped! ;)

                J Offline
                J Offline
                Jasmine2501
                wrote on last edited by
                #31

                I have a database here with 1105 tables, 644 stored procedures, 86 UDFs, thousands of indexes, etc... Some of those tables have lots of columns - the widest table has 268 columns, and 46 of the tables have over 100 columns. This is not necessarily a bad thing, and I would not say the database overall is poorly designed, and I certainly wouldn't make that determination based solely on the existence of a lot of tables, or the existence of wide tables. If there's 500 columns in a table, and all of them are uniquely dependent on the primary key, then it's normalized, and correct. In fact, a far more annoying design is the "supplement table" which simply contains extra columns that should have been put in the main table - if your key for two tables is exactly the same, then what you really have is one table, and there is no reason to split it into two tables until you get to the limitation of the RDBMS itself. So really, what you've posted doesn't constitute bad design, in itself. However, I have not seen too many databases with good design, particularly when the databases have been designed by web developers or procedural programmers. In fact, I will say I've never seen a database with good design overall, including the ones I've made myself.

                1 Reply Last reply
                0
                • R rurouniRonin

                  Some languages are just more resistant to sloppy coding (like where type safety is strictly enforced, etc.) but VB(6) and PHP are by no means weak or bad languages and they each have their pros and cons depending on the situation. The only reason people perceive them as such is because (as has been mentioned in earlier posts) they are easy to learn and very flexible so unskilled devs often get their hands on them and do terrible, terrible things! When you see what skilled developers can do with these languages you will be amazed at how powerful they really are. Be proud of being a VB dev (hopefully in VB.NET since VB6 is slowly disappearing) and ignore people who knock the language. After all, being a developer has nothing to do with syntax.

                  Y Offline
                  Y Offline
                  YSLGuru
                  wrote on last edited by
                  #32

                  "Some languages are just more resistant to sloppy coding..." Unfortunately though NONE seem to be the least resistant to poor DB design and or use of set based logic.

                  1 Reply Last reply
                  0
                  • L Lost User

                    AndyInUK wrote:

                    Is it common practice in PHP ?

                    No. It is no more common in PHP than in .net, oracle or whosoever. Bad design is bad design. Many use Joomla, here, for example, is a pgn image of the Joomla (MySQL) database schema http://www.torkiljohnsen.com/wp-content/uploads/2006/04/joomla_15_database_schema.png[^]

                    E Offline
                    E Offline
                    Eric R Johansson
                    wrote on last edited by
                    #33

                    Am I the only one who's been so horribly mauled by working in ERP systems that this schema appears understandable and quite well structured? EDIT: Typo. Long day and tired.

                    1 Reply Last reply
                    0
                    • L Lost User

                      In my personal pecking order the PHP people even are below the VB people. They don't only deal with a language that encourages awful coding, they actually have cultivated bad coding.

                      A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

                      K Offline
                      K Offline
                      kmoorevs
                      wrote on last edited by
                      #34

                      Scr@w those morons who jump at any opportunity to trash VB6 developers...I guess it makes them feel superior. The post was about poor database design which happens in any language. I have been developing in VB6 for the last 12 years. VB6 still gets the job done. Whatever shortcomings it may have, I can overcome by borrowing an API or third party component. The VB6 runtime is still included in Win7...my customers never have to install a dotnetfix...it just works period. That's what most customers want anyway, they don't give a crap what language it is written in. VB6 will be around for many more years...BTW, I also still use Classic ASP for web solutions.

                      1 Reply Last reply
                      0
                      • A AndyInUK

                        Hi All, I had to move from .NET to PHP for a bit and now the system am working on is one hell. They have a table with around 47-50 columns. It's not at all normalized and everything is in one table. Now am re-developing registration process and it's a nightmare to update each column. Is it common practice in PHP ? The problem is i know its crap and i still have to work on the existing system. :(

                        C Offline
                        C Offline
                        Christopher G S Johnson
                        wrote on last edited by
                        #35

                        I'll re-iterate what the others have said about this being language-independent. You will notice such bad design in code written by programmers using PHP, VB, C#, Java, etc. The root of the issue is the lack of knowledge and respect for proper database design. Designing a high-performance and scalable database should be work tasked to a trained database professional, unless the developer has such training, as well. Just my humble opinion. :-)

                        1 Reply Last reply
                        0
                        • A AndyInUK

                          Hi All, I had to move from .NET to PHP for a bit and now the system am working on is one hell. They have a table with around 47-50 columns. It's not at all normalized and everything is in one table. Now am re-developing registration process and it's a nightmare to update each column. Is it common practice in PHP ? The problem is i know its crap and i still have to work on the existing system. :(

                          B Offline
                          B Offline
                          BillW33
                          wrote on last edited by
                          #36

                          I have been surprised by how many senior devs do not have the slightest idea what normalizing [^]a database means or if they have heard of it why it is a good idea. I don't expect everyone to be a DBA, I'm certainly not, but I do expect at least basic database knowledge from the senior folk. If you go on a job interview and the head of the programming department has never heard of normalizing a database then keep looking.

                          Just because the code works, it doesn't mean that it is good code.

                          1 Reply Last reply
                          0
                          • S Shrimpersfan

                            What a bitch that i'm currently a junior VB developer lol! But seriously do you guys detest VB that much?

                            S Offline
                            S Offline
                            Sinisa Hajnal
                            wrote on last edited by
                            #37

                            I work with VB.NET and have produced several web sites (both for parent group of my firm) and self-standing ordering application, self-standing production software (to help the processes of the factory to track inventories, production orders etc) and it interfaces with ordering and... well, not to bother you with details... the point is that it's very objective oriented, clean code that plugs-in seemlessly into our application framework and there is nothing slow, clumsy, hard etc... in it. VB.NET is mature language and you can write good code just as easily as bad code. Experience is what counts. That remains same for C++, java, PHP or any other language you can think of.

                            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