Lambda the Ultimate

inactiveTopic SQLX
started 7/12/2003; 4:46:09 AM - last post 7/12/2003; 10:12:24 AM
Ehud Lamm - SQLX  blueArrow
7/12/2003; 4:46:09 AM (reads: 1273, responses: 2)
SQLX
In Oracle9i Database Release 2, Oracle included a new feature known as SQLX, or SQLXML. This is a collection of SQL operators added to the standard SQL library for creating XML from standard relational queries. Basically, you write a SQL statement, include a function call to one of the SQLX calls, and a piece of XML is created. Rocket science? ABSOLUTELY NOT! As a matter of fact, I'd say this approach is incredibly simple and VERY flexible.

This article presents an example of using SQLX to produce RSS feeds. You'll find links to the actual documentation at the bottom of the page.

From our perspective it is interesting to see (a) how SQL was extended and (b) how easy this process was, SQL being essentially a declerative language.


Posted to xml by Ehud Lamm on 7/12/03; 4:48:40 AM

Chris Rathman - Re: SQLX  blueArrow
7/12/2003; 9:02:01 AM (reads: 617, responses: 1)
SQL amounts to a collection of languages trying to act together. Let's see, there's the SELECT language, the FROM language, the WHERE language, the GROUP BY language, the HAVING language, the ORDER BY language, the COMPUTE BY language...

And that's not even mentioning the variations implicit within the INSERT, UPDATE, DELETE.

The xmlelement and xmlattribute tags are pretty straightforward. The xmlforest is just syntactic sugar - allowing multiple elements to be defined in one fell swoop.

Harder to understand is the xmlagg function. From what I gather, it's a form of a GROUP BY but requires dispensing with the GROUP BY syntax. IOW, the SELECT language took the brunt of the complexity, while the other clauses became antiquated.

Ehud Lamm - Re: SQLX  blueArrow
7/12/2003; 10:12:24 AM (reads: 629, responses: 0)
Well, yeah. The SELECT statement is the heart of SQL, isn't it?

Just a couple of days a go I was sitting in on a planning meeting for an SQL refresher for application programmers. The DBAs were arguing about what are the most important things the application developers seem not to know (e.g., that indexes matter). All along they were talking about giving a "quick summary of SQL." I noticed that they were only talking about SELECT statements, and said so. The reply? "But of course!"