Wednesday, January 31, 2007

XQuery and SQL – A Teaming Agreement

G’Day. For developers/DBAs alike, we are seeing a new marriage in data management. I am currently, by definition, a SQL guy. For a long time XML was below the radar. I am humbled to say this.

However, ….. The more I see XML used, whether for internal purposes or external purposes (standards), I can see that this format growing from the data interchange (its original intention) and has become a “data type”. This graduation recognizes that this popular data interchange format the XML documents become artifacts that need to be reported upon.

Naturally, the resistance for a SQL person is to “relationalize”. The relational model is great value and I do not want to undermine this value. If I did, well then I would likely be taking a XQuery course! Walking away from over 20 years of innovation in relational technology is not a wise choice. I do find it interesting to see some debates which is better relational versus XML or XQuery versus SQL. In a way, this argument is like comparing your wrench to your hammer. As a Developer, I feel we can be more equipped with both in my tool belt. XQuery helps me avoid XSLT. Two key things that vendors should/do recognize going forward:

1) XQuery must inter-operate with SQL and SQL must inter-operate with XQuery to be complete.
2) Relational is a native store and so XML storage formats be native to really provide the performance.

When considering a database, you should look at what plans the server has for the above requirements. Developers would benefit in getting a handle on the XQuery language and make sure the tool belt is well equipped. XQuery constructs remind me a lot of learning SQL. The language is not complex. Relational models have result sets and XQuery sequences. Not that big of a transition. There are tools to help you get you on-ramped to XQuery some of which are free. DB2 Developer Workbench for example.

Fact: Relational is not going away nor is XML. Review your tool belt of skills and make sure you are prepare for hybrid data management. I am doing it! It is kind of obvious from my first blog entry on Windows Vista which by the way has recently announced the plan to increase its footprint. Gee I wonder what XQuery/XML database options exist for the these users :)

No comments: