<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RESTful SQL?</title>
	<atom:link href="http://richard.cyganiak.de/blog/2006/11/restful-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/</link>
	<description>A weblog by Richard Cyganiak</description>
	<lastBuildDate>Wed, 03 Aug 2011 12:16:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Richard Cyganiak</title>
		<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/#comment-16043</link>
		<dc:creator>Richard Cyganiak</dc:creator>
		<pubDate>Thu, 23 Nov 2006 22:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://dowhatimean.net/2006/11/restful-sql#comment-16043</guid>
		<description>Thanks Mark, I think I understand your point about what to do over HTTP and what not, though I do not agree. My POV is that clearly, when your problem maps nicely into REST, then use REST, but some problems don&#039;t, and in that case tunneling over HTTP might still be the best approach because it gives at least &lt;em&gt;some&lt;/em&gt; of the benefits.

I still wonder about my POST approach a few posts up. It has the “query URI” to identify just the subset of data we want to update, but then POSTs to the URI in order to avoid the expense of having to pull all the data over the wire, increment it client-side, and push it back up. Basically it maps things nicely into resources as Stelios suggested, but allows POST with an expression language to change resources. What do you think about that?</description>
		<content:encoded><![CDATA[<p>Thanks Mark, I think I understand your point about what to do over HTTP and what not, though I do not agree. My POV is that clearly, when your problem maps nicely into REST, then use REST, but some problems don&#8217;t, and in that case tunneling over HTTP might still be the best approach because it gives at least <em>some</em> of the benefits.</p>
<p>I still wonder about my POST approach a few posts up. It has the “query URI” to identify just the subset of data we want to update, but then POSTs to the URI in order to avoid the expense of having to pull all the data over the wire, increment it client-side, and push it back up. Basically it maps things nicely into resources as Stelios suggested, but allows POST with an expression language to change resources. What do you think about that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Baker</title>
		<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/#comment-16041</link>
		<dc:creator>Mark Baker</dc:creator>
		<pubDate>Thu, 23 Nov 2006 21:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://dowhatimean.net/2006/11/restful-sql#comment-16041</guid>
		<description>Erm, yah, what Stelios said (in his last 2 messages). 8-)  I should have read all the comments first.</description>
		<content:encoded><![CDATA[<p>Erm, yah, what Stelios said (in his last 2 messages). 8-)  I should have read all the comments first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Baker</title>
		<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/#comment-16040</link>
		<dc:creator>Mark Baker</dc:creator>
		<pubDate>Thu, 23 Nov 2006 21:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://dowhatimean.net/2006/11/restful-sql#comment-16040</guid>
		<description>Richard - not everything not RESTful is not part of the Web (got that? 8-).  Cookies are a great example, as you point out.  But IMO, none of the other examples you provided are, and none should be using port 80.

I won&#039;t elaborate much more on the caching point.  You really have to implement it.  Suffice to say that it&#039;s really not that difficult at all to keep state changes local.  And where it isn&#039;t, just turn off caching.  But be wary of models or conventions which require turning it off.

To do the equivalent of your UPDATE example (btw, your SQL could use some work 8-) RESTfully - and I mentioned this on my weblog comments in the context of a similar example - the server could offer a GET form that the client could first populate with &quot;500&quot; (addressing the &gt;500 requirement), creating a new &quot;query URI&quot; (ala HTML forms) upon which GET would return a document representing all the foo values.  Then the client would do the &quot;+1&quot; and PUT it back to the server.  Voila!</description>
		<content:encoded><![CDATA[<p>Richard &#8211; not everything not RESTful is not part of the Web (got that? 8-).  Cookies are a great example, as you point out.  But IMO, none of the other examples you provided are, and none should be using port 80.</p>
<p>I won&#8217;t elaborate much more on the caching point.  You really have to implement it.  Suffice to say that it&#8217;s really not that difficult at all to keep state changes local.  And where it isn&#8217;t, just turn off caching.  But be wary of models or conventions which require turning it off.</p>
<p>To do the equivalent of your UPDATE example (btw, your SQL could use some work 8-) RESTfully &#8211; and I mentioned this on my weblog comments in the context of a similar example &#8211; the server could offer a GET form that the client could first populate with &#8220;500&#8243; (addressing the &gt;500 requirement), creating a new &#8220;query URI&#8221; (ala HTML forms) upon which GET would return a document representing all the foo values.  Then the client would do the &#8220;+1&#8243; and PUT it back to the server.  Voila!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stelios Sfakianakis</title>
		<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/#comment-16030</link>
		<dc:creator>Stelios Sfakianakis</dc:creator>
		<pubDate>Thu, 23 Nov 2006 18:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://dowhatimean.net/2006/11/restful-sql#comment-16030</guid>
		<description>Richard,

what you propose is to have the operation in the body of the HTTP message in some sort of tunneling which is not RESTful (REST has a standard number of operation that for HTTP are GET,POST,HEAD,DELETE,PUT) but let&#039;s see what Mark has to say on the subject :-)

Stelios</description>
		<content:encoded><![CDATA[<p>Richard,</p>
<p>what you propose is to have the operation in the body of the HTTP message in some sort of tunneling which is not RESTful (REST has a standard number of operation that for HTTP are GET,POST,HEAD,DELETE,PUT) but let&#8217;s see what Mark has to say on the subject :-)</p>
<p>Stelios</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Cyganiak</title>
		<link>http://richard.cyganiak.de/blog/2006/11/restful-sql/#comment-16023</link>
		<dc:creator>Richard Cyganiak</dc:creator>
		<pubDate>Thu, 23 Nov 2006 17:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://dowhatimean.net/2006/11/restful-sql#comment-16023</guid>
		<description>Apologies Stelios, I jumped to conclusions. Now I understand the approach, and it looks pretty good.

I think I&#039;d like to do it a little bit differently, to avoid having to transfer all the data back and forth. Something like

POST /codd/table?bar&gt;=500

and then in the message body the operation to apply to every row:

foo = foo + 1

This would map quite nicely to SQL:

UPDATE table SET foo = foo + 1 WHERE bar&gt;=500

I wonder what Mark thinks about this.</description>
		<content:encoded><![CDATA[<p>Apologies Stelios, I jumped to conclusions. Now I understand the approach, and it looks pretty good.</p>
<p>I think I&#8217;d like to do it a little bit differently, to avoid having to transfer all the data back and forth. Something like</p>
<p>POST /codd/table?bar>=500</p>
<p>and then in the message body the operation to apply to every row:</p>
<p>foo = foo + 1</p>
<p>This would map quite nicely to SQL:</p>
<p>UPDATE table SET foo = foo + 1 WHERE bar>=500</p>
<p>I wonder what Mark thinks about this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: richard.cyganiak.de @ 2012-02-04 10:07:10 -->
