- 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
I do this all the time, XML is the future!
Admin
I would assume that they're really leveraging the power of XML, all right.
With the short end of the lever.
Admin
Now I am just a lowly college student with 1 semester worth of database class under my belt, but I can't see why anyone would do this. Come on, databases are designed to provide quick referencing of information. How could you search using this system....sigh
FIRST POST EVER
Admin
Obviously, this guy was scared of having two databases.
Admin
I applaud this innovative use of modern technology.
Admin
The misspelling of Itinerary in the FROM clause doesn't help either...
Admin
well hey, at least SQL Server 2005 makes all of this XML usage a lot easier...
Admin
Why couldn't they just use the OPENXML functionality in SQL 2000?
Admin
Doesn't this kind of "fully extensible database" exist already? Isn't that what they call a filesystem?
Admin
I wonder how they'll ever debug and find a bug, when someone comes up with the brillant idea to modify the DTD or XSL of the XML in the table.
It's like having a database (without indexes) inside a database - imagine the load of a simple query if the XML is large.
Admin
As long as you mispel consistently.
Admin
Wow, that must be efficient. What great design.
Admin
On a related note, when is Oracle going to implement XML DOM Level 2? REAL ULTIMATE POWER!
select XMLDocument.loadXML(table.xml).selectSingleNode('/root/elem['+$id+'][@attr1]').value from mywtftable as table
Admin
This is an obvious example of improper application layering.
Admin
The intent was probably to parse the XML on the client's side and then read those additional columns...
Admin
Utter genius this one... he missed out on some more extensibility though - surely each record needs a table ID and a record ID, so you don't have all those pesky tables in the DB, just one big table!
Slightly more seriously, this issue of easy extensibility comes up more often these days - what are peoples' recommended solutions?
Admin
what a bunch of morons... Anyway they are way ahead of the Flat file comunity...
Admin
Goddamn it.
I LIKE XML. I really do. It has so many uses. But then morons like this come along who think that it solves every problem...Goddamn it! You ALREADY HAVE A RELATIONAL DATABASE. Why do you want to have to add a whole extra set of crap onto it? You'll have to run a sql query, then run the results through an XML parser, then figure out what's going on in the XML with some program logic, then extract the data you want.
No joins, no fancy sql reporting queries that can save you hundreds of lines of code. No, you get crap. And why? Because you just don't GET IT with regards to XML. If you're sending out a data file to someone, it works a hell of a lot better than CSV, if you're uploading a datafile from someone, it works a hell of a lot better than CSV. If you're just making data publicly available, it works better than putting it in excel, or access, or a text document.
BUT XML IS NOT A SUBSITUTE FOR A GODDAMN DATABASE!
Admin
I am certain that the guy who came up with this plan was immediately promoted to management.
Admin
Amen Amen Amen brother! halleluja!
Admin
Yes, this will solve all our problems in putting xml into the db. We no longer will need columsn, other than an XML Data type. We can put EVERYTHING into one giant xml doc and not have to worry about things like joins, indexes, referential integrity, etc.
Admin
So, did the company actually pay somebody to come up with this crap? Good lord, databases exist for a reason. Please use them properly.
Admin
After the WTF, I asked myself, why the INNER JOIN, why not put the test in the where clause?
Answer: Performance...
Compound WTF
Cheers
Admin
OK! OK! I take it back. Creative software design is NOT the answer. Creative software development IS. Especially when you are handed specifications like today's gem.
Admin
Uh, tables? You can create as many as you like and each one can contain different information! What's not 'extensible' about that? Why go and recreate the wheel when you have a whole freeking RDBMS at your disposal...
Admin
Admin
Yea... I'll be happy not having to worry about RI, FK and the like. But there always be at least 2 things you'd have to JOIN together. And another 2 to UNION. This is the point where guys are sorted out of men and with such great XML technology it will be even harder than now. :D
Admin
stupid editor...
I just wanted to ditto your
"BUT XML IS NOT A SUBSTITUTE FOR A GODDAMN DATABASE!" I don't like XML for the reasons you mentioned. We have too many developers thinking they aren't getting the job done if they aren't using it. I had one ding-bat writing some business object to take SQL data and load it into a class. This meat head decided to take the SQL results, make some XML output and finally got to populating the class!
Admin
And there are schemaless databases out there already for data that cannot easily be forced into tables. Relational databases do not do schemaless very well (searches and so forth), and schemaless databases aren't very good at standard relational tricks of the trade (while searches in amorphous data work much better in a schemaless database than in an RDBMS, they are not fast enough to do indexed JOINs and so forth). Horses for courses and all that....
Admin
Maybe they were concerned that their database might become over-normalized. Everyone knows the danger of an over-normalized database, I'm sure.
Admin
Yeah, I am being as sarcastic as you were.
Sincerely,
Gene Wirchenko
Admin
SWEET MOTHER OF CHRIST, What are they THINKING?
I'm sure they are not smart enough to be malicious. Somebody actually thinks this is a good design.
But I can foresee that 8 months down the road there will be a follow on project... "For an additional $xxx,xxx dollars, we could seamlessly integrate ALL the data into an 'enterprise class', fully relational database." (Going to have to really spin that one heavy!)
Define a structure and rewrite all the source, just to do what they SHOULD have done in the FIRST PLACE!
Admin
I swear to god, I made a joke about doing just this very thing on Slashdot today.
My joke was arguably worse, though, as the "data" took the form of serialized objects instead of xml fragments.
Admin
The guy who came up with it probably was management.
It's been my experience that management, more often than not, are the ones trying to use technologies where they're not appropriate.
My first post ever too...
Admin
Argh... It's jackholes like this that make it hard for those of us who know how/when to properly use XML to be able to sell using XML to other people.
I want to use XML in one of my systems. Basically I want to turn our crap server into a webservice, serving XML responses to the clients. This makes the thing easily extensible, it makes us not have to maintain this hideous piece of shit custom server, and it will make the thing far easier to deal with on a regular basis. But no, I get all sorts of shit trying to push that solution because XML has gotten such a bad rap from morons using it in all the wrong places.
Admin
Ooh, and 2 minutes after I ran out of mod points.
Admin
Because then they wouldn't be on TDWTF... Oh wait, they still would..
Admin
That's okay. There are a few places here at work where we store serialize()d php arrays in the database.
Thankfully, we usually never need to deal with them at the SQL level.
Admin
A wise Chinese man once said: "If you know how to handle a hammer, don't think of everything as a nail...". If you happen to know XML, don't throw XML at everything... A Chinese man also once said: " Now stop that f*kcing with XML and go work at MacDonalds"...
Admin
I think it's what they call a database. I don't know of any widely-used relational dbms that doesn't allow you to add columns to existing tables. You can even remove and modify them.
Admin
Enron's physical natural gas trading system did something like this. Deals were stored as CLOBS. The reasoning was "We hate our DBAs. This way we can do anything we like." Later, this was widely regarded as a mistake. They ended up supporting two other databases with sane, but slightly different schema so other applications could view their data.
Admin
In Soviet China, McDonalds use GoXML at work.
Admin
Scarery to think that someone thought this up and multiple people probably approved the concept!
Talk about layered stupidity!
Admin
I'll have the GoXML-menu, with mayo, a Attribute-shake, and some Namespace-nachos. To go please....
Admin
Not to be the voice of the Devil, but you can always graft more tables on in a sql solution. There's always some way to relate the data...if only because it's used by the same application. This kind of thing can grow into a monster in a blink, but it's way the hell better than trying to cram lesser datastructures into your database...I've seen people do that kind of stuff to avoid adding two or three tables to a schema that has less than 20 tables already.
Twenty tables is nothing. Remember the cardinal rule of RDMS...Normalization of Data...You should never ever ever ever have redundant data in your tables. A persons name should be stored in one place, and one place alone. Their birthday, one place. Their street address, one place. Every purchase they've ever made with your system...X entries, 1 table. If you need additional detail that would result in redundant entries, make a new table...Even if it's just a simple lookup table with two columns.
If your tables start proliferating wildly out of control, or you start having to make wildass queries to get all the data you need in one place, thats a problem. You need to take another look at your schema, make sure your keys are set up intelligently. Sometimes scale will mess with you, and you'll have to age data through adding on more tables to represent different weeks/months/billing years, but that is relatively simple to manage transparently through code (a switch statement will do it, so that the user doesn't have to know that 1995 and 2005 are stored in different tables), and since your keys are the same, you can still query and compare the data with simple, elegant, queries.
Admin
Clearly the problem is all the extra characters in the XML - to much to store. They clearly should have compressed the XML string to save the space. [:D]
Admin
Arrrrrgh!
I can't bring myself to read that SQL statement. I see some kind of stuff that must be an attempt at parsing XML within the query, but surely that kind of atrocity does not exist? :|
Admin
Don't worry, I took care of it. =)
Admin
Hey Alex THAN is a word all by itself.
Admin
Someone needs Tamino - http://www2.softwareag.com/Corporate/products/tamino/default.asp
It's an XML database. Yes I've had the misfortune to use it...
CAPTCHA : bozo - Hmmm....