Comment On JOIN ON WTF

It's a general rule that things will look better on paper then they will when built. In the world of design, you don't have to worry about things like "reality" getting in your way. Of course, when you start off with an idea like … [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Re: JOIN ON WTF

2006-02-20 14:14 • by Frank Cassata
I do this all the time, XML is the future!

XML.Leverage(null);

2006-02-20 14:15 • by Brian Kemp

I would assume that they're really leveraging the power of XML, all right.

With the short end of the lever.

Re: JOIN ON WTF

2006-02-20 14:16 • by Miller
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

Re: JOIN ON WTF

2006-02-20 14:18 • by Ametheus
Obviously, this guy was scared of having two databases.

Re: JOIN ON WTF

2006-02-20 14:19 • by Joost_
60884 in reply to 60882
I applaud this innovative use of modern technology.

Re: JOIN ON WTF

2006-02-20 14:23 • by Dan H.
The misspelling of Itinerary in the FROM clause doesn't help either...

Re: JOIN ON WTF

2006-02-20 14:25 • by Matt B
well hey, at least SQL Server 2005 makes all of this XML usage a lot easier...

Re: JOIN ON WTF

2006-02-20 14:26 • by Cam
60887 in reply to 60886
Why couldn't they just use the OPENXML functionality in SQL 2000?

Re: JOIN ON WTF

2006-02-20 14:26 • by Santxo
Alex Papadimoulis:

The database design will be fully extensible. All tables will have only a few columns (such as ID's and created dates), and the rest of the data will be stored in an XML-formatted TEXT column



Doesn't this kind of "fully extensible database" exist already? Isn't that what they call a filesystem?

Re: JOIN ON WTF

2006-02-20 14:27 • by ServerDude
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.


Re: JOIN ON WTF

2006-02-20 14:28 • by Willie
60891 in reply to 60885

The misspelling of Itinerary in the FROM clause doesn't help either...


As long as you mispel consistently.

Re: JOIN ON WTF

2006-02-20 14:28 • by toddhilehoffer
Wow, that must be efficient. What great design.

Re: JOIN ON WTF

2006-02-20 14:29 • by Joost_
60893 in reply to 60884
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

Re: JOIN ON WTF

2006-02-20 14:30 • by retnuh
This is an obvious example of improper application layering.

Re: JOIN ON WTF

2006-02-20 14:31 • by toxik
The intent was probably to parse the XML on the client's side and then read those additional columns...

Re: JOIN ON WTF

2006-02-20 14:31 • by versatilia
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?



Re: JOIN ON WTF

2006-02-20 14:35 • by zamies
what a bunch of morons... Anyway they are way ahead of the Flat file comunity...

Re: JOIN ON WTF

2006-02-20 14:46 • by Satanicpuppy
60898 in reply to 60897
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!

Re: JOIN ON WTF

2006-02-20 14:47 • by osp70
I am certain that the guy who came up with this plan was immediately promoted to management.

Re: JOIN ON WTF

2006-02-20 14:59 • by Fregas
60903 in reply to 60898

Satanicpuppy:
Goddamn it.

BUT XML IS NOT A SUBSITUTE FOR A GODDAMN DATABASE!


Amen Amen Amen brother!  halleluja!

Re: JOIN ON WTF

2006-02-20 15:03 • by Fregas
60905 in reply to 60886

Matt B:
well hey, at least SQL Server 2005 makes all of this XML usage a lot easier...


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.

Re: JOIN ON WTF

2006-02-20 15:07 • by dmdietz
So, did the company actually pay somebody to come up with this crap?  Good lord, databases exist for a reason.  Please use them properly.

Re: JOIN ON WTF

2006-02-20 15:09 • by Morrolan

After the WTF, I asked myself, why the INNER JOIN, why not put the test in the where clause?


Answer: Performance...


Compound WTF


Cheers

Re: JOIN ON WTF

2006-02-20 15:10 • by pmagill
60910 in reply to 60907
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.

Re: JOIN ON WTF

2006-02-20 15:12 • by Imroy
60911 in reply to 60896
versatilia:


Slightly more seriously, this issue of easy extensibility comes up more
often these days - what are peoples' recommended solutions?



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...

Re: JOIN ON WTF

2006-02-20 15:15 • by tSQL
60912 in reply to 60898
Satanicpuppy:
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!

Re: JOIN ON WTF

2006-02-20 15:17 • by zgoda
60913 in reply to 60905
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

Re: JOIN ON WTF

2006-02-20 15:19 • by tSQL
60914 in reply to 60912

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! 

Re: JOIN ON WTF

2006-02-20 15:20 • by Stan Rogers
60915 in reply to 60911
Imroy:
versatilia:


Slightly more seriously, this issue of easy extensibility comes up more
often these days - what are peoples' recommended solutions?



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...

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....

Re: JOIN ON WTF

2006-02-20 15:21 • by GalacticCowboy
60916 in reply to 60882
Maybe they were concerned that their database might become over-normalized.  Everyone knows the danger of an over-normalized database, I'm sure.

Re: XML.Leverage(null);

2006-02-20 15:25 • by Gene Wirchenko
60919 in reply to 60881
Anonymous:
I would assume that they're really leveraging the power of XML, all right.

With the short end of the lever.

But it is such a powerful approach!  If you can ever get that short end to move, the change on the other end will be huge!

Yeah, I am being as sarcastic as you were.

Sincerely,

Gene Wirchenko

Re: JOIN ON WTF

2006-02-20 15:29 • by marvin_rabbit
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!

Re: JOIN ON WTF

2006-02-20 15:34 • by sammybaby

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.

Re: JOIN ON WTF

2006-02-20 15:34 • by Millen
60924 in reply to 60899
osp70:
I am certain that the guy who came up with this plan was immediately promoted to management.




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...

Re: JOIN ON WTF

2006-02-20 15:38 • by Otto
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.

Re: JOIN ON WTF

2006-02-20 15:45 • by magnus
60927 in reply to 60923
sammybaby:

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.



Ooh, and 2 minutes after I ran out of mod points.

Re: JOIN ON WTF

2006-02-20 15:46 • by hash
60928 in reply to 60887
Anonymous:
Why couldn't they just use the OPENXML functionality in SQL 2000?


Because then they wouldn't be on TDWTF... Oh wait, they still would..

Re: JOIN ON WTF

2006-02-20 15:52 • by merreborn
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.

Re: JOIN ON WTF

2006-02-20 15:53 • by SurfMan
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"...

Re: JOIN ON WTF

2006-02-20 16:06 • by Suck My Lisp
60932 in reply to 60888
Anonymous:

Doesn't this kind of "fully extensible database" exist already? Isn't that what they call a filesystem?




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.

Re: JOIN ON WTF

2006-02-20 16:08 • by mpswaim
  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.

Re: JOIN ON WTF

2006-02-20 16:10 • by trollable
60934 in reply to 60931
SurfMan:
A Chinese man also once said: " Now stop that f*kcing with XML and go work at MacDonalds"...

In Soviet China, McDonalds use GoXML at work.

Re: JOIN ON WTF

2006-02-20 16:19 • by sgrieger
60935 in reply to 60899

Scarery to think that someone thought this up and multiple people probably approved the concept!


Talk about layered stupidity!

Re: JOIN ON WTF

2006-02-20 16:21 • by SurfMan
60936 in reply to 60934

trollable:
SurfMan:
A Chinese man also once said: " Now stop that f*kcing with XML and go work at MacDonalds"...

In Soviet China, McDonalds use GoXML at work.
\


I'll have the GoXML-menu, with mayo, a Attribute-shake, and some Namespace-nachos. To go please....

Re: JOIN ON WTF

2006-02-20 16:28 • by Satanicpuppy
60938 in reply to 60915
Stan Rogers:
Imroy:
versatilia:


Slightly more seriously, this issue of easy extensibility comes up more
often these days - what are peoples' recommended solutions?



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...

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....


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.

Re: JOIN ON WTF

2006-02-20 16:29 • by NacDaddy
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]

Re: JOIN ON WTF

2006-02-20 16:29 • by Arancaytar
The database design will be fully
extensible. All tables will have only a few columns (such as ID's and
created dates), and the rest of the data will be stored in an
XML-formatted TEXT column


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?
:|

Re: JOIN ON WTF

2006-02-20 16:34 • by Satanicpuppy
60941 in reply to 60927
magnus:
sammybaby:

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.



Ooh, and 2 minutes after I ran out of mod points.


Don't worry, I took care of it. =)

Re: JOIN ON WTF

2006-02-20 17:04 • by maht
Alex Papadimoulis:

It's a general rule that things will look better on paper then they will when built.



Hey Alex THAN is a word all by itself.

Re: JOIN ON WTF

2006-02-20 17:24 • by Cowboy Bob
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....

« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Add Comment