Simplify Apps Using XML With PHP and DB2
An anonymous reader writes "IBM DeveloperWorks has an article from a little while back that takes a look at the impact of schema evolution on the application. The narrative walks the reader through a usage scenario to illustrate the ease of setting up a PHP environment and integrating DB2 native XML functionality with PHP applications including web services written in PHP and XQuery."
Looks like IBM's been slashdotted? Thats not very desirable from an IT company that is always banging on about scalability!
...they implemented "XML databases" by treating XML as BLOB's and adding XML parsing and updating capabilities to SQL. Hybrid indeed. I'd be rather tempted to call it a bastardization of both contepts (relational and XML).
The thought springs to mind that PHP, as it happens, would be uniquely suited to working with the hypotethical XML databases, due to it's rather particular concept of arrays. As many of us undoubtely know, a PHP array can be used to contain a tree of arbitrary shape and size, and with nodes of arbitrary types. A native, 1-on-1 match to an XML tree.
A couple of years ago I tried looking for a native XML database. The solutions were either very pricey, or very slow, or both. Nothing to keep up to RDBMS. The whole "XMLDBMS" hype died over eventually, as you may recall. OR hasn't it? Are such hybrid solutions all that's left of the concept? It was a great idea.
i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
You can summarize it as: "Apps are simpler if the DBMS directly supports the data types you're using."
Yeah, NO SHIT. You mean there's data out there that's not INT or CHAR?
Codd is rolling in his grave. 30+ years since he developed the relational model, and still nobody's bothered implementing it.
Granted, he was talking about Python, not PHP... but still...
There's a hidden treasure in Python 3.x: __prepare__()
An XSLT Processor would do this for you.
Using the document() function access your various files.
And using XPath query/search in those files/structures.
XQuery and XPath in the XML world are functionally equivalent, just XQuery looks a bit like SQL.
Updating the XML files, now thats a different matter...
xml and db2 tend to complicate things more than simplify them
From the article:
Bogometer Pegged!
If they had made the opposite assumption (that the business data was not in XML format, a much more common scenario), then, the added complexity of translating the data to an XML format would have made the non-DB2 approach look cleaner and more reasonable.
I had forgotten how much cooler teenagers look when they are smoking. Oh, wait
Simplify, DB2 and XML in one sentence. This is odd.
I thought AJAX was the latest alphabet soup fad of the month. Just when you ordered the books for the newest fad, something newer comes out.
"setting up a PHP environment and integrating DB2 native XML functionality with PHP applications including web services written in PHP and XQuery."
Anyone else get an orgasm from all those buzzwords in the same sentence?