Page 1 of 1

NERDRAGE - DataBase Design

Posted: 18 Feb 2010, 14:36
by Cartollomew
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.

Re: NERDRAGE - DataBase Design

Posted: 18 Feb 2010, 21:38
by midi
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!

Re: NERDRAGE - DataBase Design

Posted: 19 Feb 2010, 02:04
by Cartollomew
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.

Re: NERDRAGE - DataBase Design

Posted: 27 Feb 2010, 16:19
by Toriigate
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.

Re: NERDRAGE - DataBase Design

Posted: 27 Feb 2010, 21:04
by Mitra
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...