Lists Home |
Date Index |
> I agree that for simple sql requests the URL is fine. But if you want
> use the full request capabilities wich are template based you'll have
SQL Server has a concept of a XML-SQL mapping that lets you put XPath as
part of the URI. Something like:
I am pretty sure that Oracle does this as well.
I personally think that this idea of an "XML View" is a great way to
webify a relational database and make all of the data universally
addressable. It is also consistent with RESTful idea of "mediated view"
over a resource. SQL data thus exposed is accessible from XSLT
document() function, and all of the other GET clients.
I have two opposite things to say about this:
1) I'm not about to encode a complex query using GET, say a 5-way join with
outer joins and other conditions, including an embedded query. I probably
could, but I wouldn't.
2) I shouldn't have to make this complicated query at all, because the data
service provider, should be using views that do most of the work. The views
would require only a simple query, with a few parameters, and that query
__could__ (usually) be sent via a GET.
It's not a new idea at all to expose your data using views. It predates the
Web, for sure. The lesson from this is that it's a good thing to think
carefully about how your data (or other resources) is going to be exposed,
and when you do, you can often make it more palatable for simple operations.