Darrell Norton's Blog [MVP]

Sponsors

The Lounge

Wicked Cool Jobs

News

  • Darrell Norton pic

    MVP logo

    View Darrell Norton's profile on LinkedIn

    Currently Reading:

    weewar.com

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
My Worst Database Experience Ever

Roy is talking about database sins.  I worked on porting one database that had to be the worst I’ve ever seen in my entire career.

First off, it was an Access database.  It starts off well doesn’t it?  J  Well, it was an Access database split into two parts (the front file and the back file), each a couple hundred MB each.  And they used the ldb locking file to manage roles, passwords, etc.  Great huh?  It gets better.

There were 100 tables or so.  Some were in the front file, some were in the back file, some were in both and were not linked tables!

There was not one relation in the entire database!

One table held 5 different types of objects.  True they were related to each other, but not the same.  The VBA code was littered with if(type = A) then do x elseif (type=B) then do y etc.

All forms would select * from tableName, even if the form only needed one value.  Oh, and it did this with the table that held 5 different types of objects (which were the centerpiece of the domain model, thus there were lots of records in the table), so some forms took 2 minutes to open while it selected the entire table, and then filtered the results to typeA only and then displayed 5 of the fields!

And beside the primary key identifier on some of the tables (some tables had none), all fields were nullable!  There were probably 25,000 IsNull checks in the VBA code.

There was more, but the rest was peanuts compared to this!


Posted Thu, Feb 19 2004 6:23 AM by Darrell Norton

[Advertisement]

Comments

Steve wrote RE: My Worst Database Experience Ever
on Thu, Feb 19 2004 1:59 AM
Gotta love them Access databases!
Thomas Tomiczek wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 2:00 AM
I may have a better one.

"moron designed access db" handling invoicing.

In order not to have the invoice tables getting too long, the system generated TWO new tables per invoice (invoice, invoicedetails). The poor customer had thousands of tabls in there with 1 (invoice) and a handfull (invoicedetail) lines each.

Naturally you needed to query all these pretty often in a uniform way, so the "create new invoice" method also updates a cascade (one was not enough) of queries which features a JOIN.

Performance was interesting. Yeah, Really interesting.

I suppose some people are just too stupid for their job in IT.
Darrell wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 2:27 AM
Steve - yes, I love Access databases like I love hangnails. :)
Darrell wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 2:28 AM
Thomas - ooh, nice one with the table-per-invoice theory. Pretty impressive display of ignorance there. You know, it's people like that that make it easy for consultants to look good.
Roy Osherove wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 2:52 AM
ack! is all I can say. Still, I have more sins to come. One of them involves two big methods named... yep, "Doit" and "DoIt1".
Donny Mack wrote Post not about SQL Server, but Let's Make it!
on Thu, Feb 19 2004 3:46 AM
Post not about SQL Server, but Let's Make it!
Darrell wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 4:26 AM
Roy - hehehe, the infamous "DoIt" methods, with a number tacked on for every new version needed. It ranks right up there with calling all of your variables myVariable1, myVariable2, etc. :)
Mark Bonafe wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 7:52 AM
Ahhh. You have a whole new appreciation for Access now. Don't you Darrell?
Mark Bonafe wrote XTreme Best Practices
on Thu, Feb 19 2004 10:43 AM
XTreme Best Practices
Avonelle Lovhaug wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 11:31 AM
The icky project I tried to clean up had variables named the following:

- mess
- Ben
- Mark
- Jesus

At first, I thought it was for the former programmers, but I doubt that Jesus was working on this particular effort.
Thomas Tomiczek wrote re: My Worst Database Experience Ever
on Thu, Feb 19 2004 12:20 PM
::At first, I thought it was for the former
::programmers, but I doubt that Jesus was
::working on this particular effort.

This was just the wishfull thinking hoping for some wonder to save the butts of the incompetnt dudes working there before you.

They WISHED Jesus would come along and hlp them :-)
Enjoy Every Sandwich wrote Take Outs: The Digital Doggy Bag of Blog Bits for 18th and 19th February 2004
on Thu, Feb 19 2004 5:10 PM
Take Outs: The Digital Doggy Bag of Blog Bits for 18th and 19th February 2004
Darrell wrote re: My Worst Database Experience Ever
on Fri, Feb 20 2004 2:55 AM
Avonelle - yeah, Jesus would never have supported that architecture, right?

Instead of turning water into wine, maybe he could turn bad code into good? :)
Devlicio.us