- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
You would not believe how backward the IRS is. Or how afraid they are to make any changes to their systems. Most of their systems are firmly mired in the 1960's and 70's.
Admin
I am really sorry to see so many comments blame the DBAs. For sure, in this particular case he should have investigated. But defining PKs, FKs and indexes aren't for the DBA to do. PKs and FKs are merely a design issue (PKs define how you define a row is unique). Indexes depend on the queries you issue, and are therefore a development issue. When a DBA has 100 databases to manage (I know such cases), do you think he has the leisure to analyse how databases are designed? Most of his time will be consumed by refreshing development databases from backups of production databases, checking that backups worked OK, patching and the like. It's a little facile to say "my program is as slow as a snail, and the DBA didn't create the indexes!"
Admin
And that would explain the use of "properly" in RealDatabaseProgrammer's post you were replying to, wouldn't it?
Over-normalizing isn't proper normalization; it's over-normalization. Learn to read.
Posters named "Joe" who can't comprehend the posts shouldn't reply to them. Yep. That's an "absolutist" [sp] statement. Please.
Admin
We too.
Admin
As Dave Barry says: "I realize I'm generalizing here, but as in most cases when I generalize, I don't care."
Admin
Admin
http://video.google.com/videoplay?docid=-1656880303867390173
This might be interesting. Although, normally you don't get away with it. I don't live in america to be honest.
America is an interesting field to lern from, since methods like that also come to germany slowly. (That's where I live.)
Admin
It's the same in every country, we have here a multimillion euro system, that looks like it was built by high school students and sadly also works like such. Of course with every new release it's more broken than before...
Admin
Tell Wesley Snipes "Hi" for us when you try this.
Admin
Yeah I once tried something similar, typing "rm -rf /" as root on our production database. And I almost hit "Enter" instead of "Backspace" when I wanted to delete the line... Go figure.
Admin
Hey thanks, I'm maintaining your code right now, you bastard.
Admin
Is it domain data or does it get updated from time to time? Perfectly reasonable to do this sometimes so you can reference some data in a query and update it from one place infrequently.
Admin
There are Column Major Databases. They have some advantages over the Row Major Database storage in common use.
I don't think Column-oriented databases eliminate the need for indexes or keys. They just perform certain reads and aggregates like COUNT(row) faster.
Admin
I work for the Canadian Government, and it is universally here too. I'm a student doing web design for this ministry and it's frustrating me almost to the point of insanity. I tried to put forth the concept to introduce - god forbid- a wiki, and it's blossomed into 8 months of paperwork, proposals, working groups, and meetings. Thank god i go back to school in Sept.
Not to mention all their dev work is outsourced, and i'm strictly verboten to do anything more complicated than a mail script.
Don't work in government unless you want a rock-solid stable job with little chance of innovation.
Admin
In short - idiots who don't know how to use a relational database shouldn't design them.
Admin
Right now I am looking at a refund checkstub in one hand & a notice that I have failed to file my taxes in the other.
Admin
Of course, if you were insane, you could put them on top of a real-time operating system.
In general, the limits (as observed many times above) are O(n) and O(n log n). In terms of scalability, you're not talking about algorithms; you're talking about system architecture. Ignoring distributed databases over a FDDI ring, and assuming a single server, it basically comes down to the design of the schema itself and the amount of RAM you have handy.
You're probably better off re-specifying the problem.
Admin
I was replying to an apparent idiot (anonymous) who believes that adding a (presumably auto-incrementing) int as a foreign key is some form of normalisation. It is not. It is merely a sensible thing to do. It doesn't actually help if the users persist in submitting queries based upon the original VARCHAR(200), but there's not much you can do about that, other than castrating the silly bastards for the good of mankind or (even crueller) encapsulating all queries into a stored procedure and allowing access only via the One True DBA.
Thank you for explaining the semantics of a VARCHAR to me. That was most useful. It was particularly useful in that I had always assumed (what with being an ancient VOS and PL/1 programmer) that the whole point of a VARCHAR was that it didn't care about ASCII 0. Otherwise, why waste two bytes for the length? I must remember that.
The idiot to whom I replied did have at least one valid point, however. Those naughty 3GHz cpus do have an O(log n) problem calculating a hash on a VARCHAR, whereas they only have an O(1) problem calculating an, er, integer from an integer.
And then hashing (or indeed PATRICIAing) that integer, btw. You seem to be under the misapprehension that there's some sort of cretinous linear search going on there. Or maybe not -- I'm guessing at your translation from German to English here; in which case, verzeihen Sie mir.
Actually, I'm surprised that the idiot in question didn't use a BLOB as his example. Now, there's a wonderful example of a well-chosen foreign key.
All of this is trivial. Can we get back to real programming (eg VB.Net) now?
Admin
almost is the difference between a comment on this site, and a featured article
Admin
Am I alone to find completely irresponsible to have launched such a dangerous request (alter table) on a production system without even looking at a test system ?
Admin
I'm sorry that I was again stepping on your toes without taking the time to actually understand what is going on. In fact, Andrews "point" makes so few sense that it confused me completely. He seems to mess up several concepts and jumps from one keyword to another without finishing his thoughts. I suspect that he is an Access newbie. Using a VARCHAR(200) as a key is a WTF on its own which can only be topped by using a BLOB (that was a good one).
And now let's really get back to: TRWTF is using VB or .NET, or Java, or Coldfusion, or PHP or whatever language. Sometimes I think TRWTF is writing programs.
Admin
Yes, operation of an "open heart" is a really thrilling thing that you should try at least once before you die.
Admin
In a properly designed database, normalizing causes the construction of indexes which improve performance. I was pleased to discover, after a few YEARS of use, that PostgreSQL was busy building indexes for every single foreign key and check constraint I built.
In short, the more specific I was about normalizing the database, the better the overall query time simply by defining how the relationships should occur.
I really can't give a better example of effective sofware design. This is simply fantastic!!!
Admin
Admin
On a run-of-the-mill PC, loading such index would take ~12 seconds. WTF?
Admin
This is why on modern systems, .* will not expand to . or .. and rm -r will not descend into them.
Admin
What about an address book with several million rows?
Admin
The real WTF is that the existence of indexes isn't the very first thing he checked for.
Admin
I would be tempted to type "DROP DATABASE database_name" and just leave it in the query window.
I wouldn't execute it, but just to give the DBA sitting there a heart attack.
EVIL! I love it!
Admin
Admin
Heh. I think any large company comes close to that, too. I've seen it as my company has grown from 60 to over 600 people.
BTW, didn't the IRS have oh, I dunno, a development copy of the database lying around for him to work on...?
Admin
It's indeed faster to do a lookup on a 0NF table <g>
Admin
Don't wear a helmet when motorcycling. It increases drag.
Admin
Actually, the REAL WTF is why don't they fire the whole lot of them, ESPECIALLY those DBAs! They should also forget the taxes. All it does is buy PORK! I swear, sometimes I just want to go KOSHER!
Admin
BTW regarding the speed of creating the indexes... Sometimes adding an index on a small table can make a fantastic difference, ESPECIALLY if other tables are partitioned in some way and/or excluded by criteria in the smaller table and/or it saves enough space to use a quicker method, etc....
Admin
You wouldn't PLAN to execute it. When the DBA tackled you out of the chair and one of you accidentally hit the enter key though... It'd all get blamed on you.
Admin
Or....you could be like my current lead (and others I've seen before): You've been around since before there was such a thing as a "database".
How many govt. folks know of the Peter Principle (rising to one's own level of incompetence).
You don't - and you never will...care to act for more. After all, it "works" now, doesn't it?