NERDRAGE - DataBase Design

Get something off your chest.
AND GET OFF MY LAWN!
Post Reply
User avatar
Cartollomew
I has a monocle (Site Admin)
Posts: 8804
Joined: 22 Aug 2006, 12:11
Location: Perth

NERDRAGE - DataBase Design

Post by Cartollomew » 18 Feb 2010, 14:36

Oh ffs:

(11:27:40 AM) Self: so this database we're writing software for
(11:27:45 AM) Self: has validation for the fields
(11:28:08 AM) Self: you know - stuff like, you can't put a driver's dob in that would make them younger than their years of driving experience
(11:28:27 AM) Self: except there's a field here for year of manufacture for a car
(11:28:40 AM) Self: and the validation rule is:
between 1979 and 9999
(11:28:58 AM) Self: so okay, NOBODY is going to be driving a car older than 1979 - that's PREPOSTEROUS
(11:29:16 AM) Self: and we'd better plan for this database to still be in use when people are driving cars in SEVEN THOUSAND YEARS TIME
(11:29:18 AM) Self: ffs
(11:29:44 AM) Constance: HAHAHA
(11:29:50 AM) Constance: that's sort of awesome in a retarded kind of way
(11:30:10 AM) Self: gotta give the DBA points for thinking about longevity
(11:30:29 AM) Self: but what happens when it clocks over to the year 10000, DBA?
Did you think about that?
(11:30:44 AM) Constance: it'll be Y10k
(11:30:45 AM) Constance: yikes
(11:30:48 AM) Self: THE WHOLE COMPANY WILL FAIL BECAUSE YOU DIDN'T PLAN FOR THE Y10K BUG


Most of the DBs we come across have been poorly designed, but this one takes the cake.
There are a host of nitpicky little validation rules that don't serve to improve the quality of the data contained, but do serve to make our lives a true hell whenever a user's input is slightly at odds with what the DBA had in mind.

Also, there are spelling errors IN THE FIELD NAMES.
Who do you think you are? If you'd stopped winning, you could have been the Biggest Loser, if you gave up, you could have been a Survivor, if you'd stopped reading Orwell, you could have been on Big Brother!

User avatar
midi
Legendary
Posts: 3592
Joined: 14 Nov 2007, 12:10
Location: Midget say what?

Re: NERDRAGE - DataBase Design

Post by midi » 18 Feb 2010, 21:38

What's the difference between

Code: Select all

select id from access where objecttype in (1234,5678) and objecturi in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)

and

Code: Select all

select /* (access objecturi) */ id from access where objecttype in (1234,5678) and objecturi in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)
???

About 2 minutes. FUCK YOU ORACLE!
¯\_(ツ)_/¯ soak rifts or riot ¯\_(ツ)_/¯

User avatar
Cartollomew
I has a monocle (Site Admin)
Posts: 8804
Joined: 22 Aug 2006, 12:11
Location: Perth

Re: NERDRAGE - DataBase Design

Post by Cartollomew » 19 Feb 2010, 02:04

Heh, I've heard a few nightmare stories about badly designed databases in enterprise or government environments where the size of the data has just grown so large as to multiply the inefficiencies - queries that should be almost instant take *a day* to complete.

Often they can be fixed with minimal optimisation - if you can find a manager prepared to take the risk.

At my old work they used to have DB tasks that would run every 4 hours... which used to be fine, but now the task itself would take longer than 4 hours.
Who do you think you are? If you'd stopped winning, you could have been the Biggest Loser, if you gave up, you could have been a Survivor, if you'd stopped reading Orwell, you could have been on Big Brother!

User avatar
Toriigate
Rare
Posts: 188
Joined: 22 Jun 2009, 10:42

Re: NERDRAGE - DataBase Design

Post by Toriigate » 27 Feb 2010, 16:19

Don't worry Cart, you're not alone! Database nerdrage is my life atm. Depending how you count it, we're working on 50000 data points sampled every minute, 24 hours a day, 5.5 days a week. Indices, row counts, page sizes and much more crazy technical stuff that I definitely won't talk to my friends or family about at the end of the day. I think we're stuck with MSSQL though I think kdb+ might be more what we need. For now though, I am doing the best I can to keep the field names spelled correctly.

As for crazy data validation... when I was a data fellow for the Obama campaign in NC we had voters from the state registered voter database who had died before they were born (or alternatively, reborn?) ... and several 140 year old ladies, well past the 122 old Guinness record for oldest person.

Mitra
Legendary
Posts: 2002
Joined: 22 Aug 2006, 14:11
Location: Perth W.A.

Re: NERDRAGE - DataBase Design

Post by Mitra » 27 Feb 2010, 21:04

Toriigate wrote:Don't worry Cart, you're not alone! Database nerdrage is my life atm. Depending how you count it, we're working on 50000 data points sampled every minute, 24 hours a day, 5.5 days a week. Indices, row counts, page sizes and much more crazy technical stuff that I definitely won't talk to my friends or family about at the end of the day. I think we're stuck with MSSQL though I think kdb+ might be more what we need. For now though, I am doing the best I can to keep the field names spelled correctly.

As for crazy data validation... when I was a data fellow for the Obama campaign in NC we had voters from the state registered voter database who had died before they were born (or alternatively, reborn?) ... and several 140 year old ladies, well past the 122 old Guinness record for oldest person.



my biggest databas worry is that our inventory system has a hard limit on the length of suppliers stock codes eg we sell meatpie1 vendor code is offalandgibletinpastry(wrappedinplastic) we can't enter it so when there is a one character difference at the end.... we get sent the wrong shit...
"Life is no Nintendo game / But you lied again / Now you get to watch her leave / Out the window / Guess that's why they call it window pane" -Eminem 'Love the way you lie' - Award for Excellence in Puns in the medium of Rap 2010

Post Reply