<?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: CouchDB and ORMs</title>
	<atom:link href="http://www.rowtheboat.com/archives/37/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rowtheboat.com/archives/37</link>
	<description>The online home of George Palmer</description>
	<lastBuildDate>Fri, 29 Jan 2010 18:24:24 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Justin Blake</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-5787</link>
		<dc:creator>Justin Blake</dc:creator>
		<pubDate>Fri, 29 Jan 2010 18:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-5787</guid>
		<description>@chris: I think a blog (Post + Comments) is the perfect example of relational data. A post also has an author, so does a comment. A post may belong to a category. It may have a handful of tags. How is that not relational?</description>
		<content:encoded><![CDATA[<p>@chris: I think a blog (Post + Comments) is the perfect example of relational data. A post also has an author, so does a comment. A post may belong to a category. It may have a handful of tags. How is that not relational?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hoeppner</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-5104</link>
		<dc:creator>Chris Hoeppner</dc:creator>
		<pubDate>Tue, 24 Nov 2009 12:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-5104</guid>
		<description>You shouldn&#039;t try mapping the functionality of a relational database onto a document oriented database. That makes no sense. If you have relational data, use a relational database.

But most web data isn&#039;t really relational. It is made relational to fit into a relational database, because that&#039;s what we&#039;re used to.  Post + Comments? Post document + array of comments. Inline. Who needs relations here?</description>
		<content:encoded><![CDATA[<p>You shouldn&#8217;t try mapping the functionality of a relational database onto a document oriented database. That makes no sense. If you have relational data, use a relational database.</p>
<p>But most web data isn&#8217;t really relational. It is made relational to fit into a relational database, because that&#8217;s what we&#8217;re used to.  Post + Comments? Post document + array of comments. Inline. Who needs relations here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Blake</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-4492</link>
		<dc:creator>Justin Blake</dc:creator>
		<pubDate>Fri, 11 Sep 2009 14:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-4492</guid>
		<description>I don&#039;t see the appeal in using to couchdb if your application depends on a schema that is very structured and relational. For example, with posts to comments, this seems like a perfect match for a relational database + ActiveRecord, so why not use that?

There are some great uses for couchdb, but I don&#039;t think &quot;a HTTP interface, fantastic scaling ability due to bi-directional replication, and schema free nature&quot; are reason enough (in most cases) to try and map the functionality of a relational database onto document oriented database.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see the appeal in using to couchdb if your application depends on a schema that is very structured and relational. For example, with posts to comments, this seems like a perfect match for a relational database + ActiveRecord, so why not use that?</p>
<p>There are some great uses for couchdb, but I don&#8217;t think &#8220;a HTTP interface, fantastic scaling ability due to bi-directional replication, and schema free nature&#8221; are reason enough (in most cases) to try and map the functionality of a relational database onto document oriented database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Palmer</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-870</link>
		<dc:creator>George Palmer</dc:creator>
		<pubDate>Thu, 02 Apr 2009 08:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-870</guid>
		<description>@alex - Using the example on http://www.cmlenz.net/archives/2007/10/couchdb-joins CouchFoo currently uses the 2nd approach.  I&#039;m going to add support for inline associations (1st approach) as there are still some circumstances where this is useful.

The 3rd approach though is still a pattern and something that could be added for associations (indeed I intend to do this).  In the same way the more you use SQL you notice patterns and can abstract around them to make it quicker to use via an ORM, I believe the same happens with CouchDB.  No abstraction can cover all cases though and that&#039;s why you can define views manually (in the same way you can define SQL queries manually).

Personally I prefer to have the majority of cases handled for me and manage the exceptions myself although this does depend on the user having a knowledge of how CouchDB works.</description>
		<content:encoded><![CDATA[<p>@alex &#8211; Using the example on <a href="http://www.cmlenz.net/archives/2007/10/couchdb-joins" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.cmlenz.net');" rel="nofollow">http://www.cmlenz.net/archives/2007/10/couchdb-joins</a> CouchFoo currently uses the 2nd approach.  I&#8217;m going to add support for inline associations (1st approach) as there are still some circumstances where this is useful.</p>
<p>The 3rd approach though is still a pattern and something that could be added for associations (indeed I intend to do this).  In the same way the more you use SQL you notice patterns and can abstract around them to make it quicker to use via an ORM, I believe the same happens with CouchDB.  No abstraction can cover all cases though and that&#8217;s why you can define views manually (in the same way you can define SQL queries manually).</p>
<p>Personally I prefer to have the majority of cases handled for me and manage the exceptions myself although this does depend on the user having a knowledge of how CouchDB works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: langalex</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-856</link>
		<dc:creator>langalex</dc:creator>
		<pubDate>Wed, 01 Apr 2009 09:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-856</guid>
		<description>george, thanks for this post. a few things i would like to outline:

you are talking about ORMs - that stands for &quot;object relational mapper&quot; and couchdb is not a relational database, i.e. there can&#039;t be an ORM for couchdb. i know it&#039;s just a small thing but i think getting the words right is important.

when you compare using activerecord as an abstraction on top of sql to using couchfoo as an abstraction to couchdb i think there is one important point you are missing: while activerecord allows you to generate some 99% of all the queries you will ever need this doesn&#039;t work with couchfoo. you can only generate very basic and minimal map/reduce functions automatically and as soon as you start overusing that (by using couchdb like a relational database with loading relations and joining them) you very quickly start working against couchdb. i&#039;m not talking about losing a bit of performance here and there (btw. i love how ativerecord abstracts away sql for me) but about missing the whole concept of how couchdb works.

to your document/comments example: suppose you want to show a list of documents with the number of comments on each. what you would do with activerecord is to load the documents first and then load all the comments to all the documents in order to count them (you would optimize this at some point and do a custom sql query that counts for you but that is something activerecord doesn&#039;t help you with). now if you insist on doing this in couchdb the same way you are missing the fact that with more direct access to the couchdb API this would have been trivial and most efficient from the start without even thinking about optimizations. by keeping to the activerecord way you create yourself a class of problems you shouldn&#039;t even have.</description>
		<content:encoded><![CDATA[<p>george, thanks for this post. a few things i would like to outline:</p>
<p>you are talking about ORMs &#8211; that stands for &#8220;object relational mapper&#8221; and couchdb is not a relational database, i.e. there can&#8217;t be an ORM for couchdb. i know it&#8217;s just a small thing but i think getting the words right is important.</p>
<p>when you compare using activerecord as an abstraction on top of sql to using couchfoo as an abstraction to couchdb i think there is one important point you are missing: while activerecord allows you to generate some 99% of all the queries you will ever need this doesn&#8217;t work with couchfoo. you can only generate very basic and minimal map/reduce functions automatically and as soon as you start overusing that (by using couchdb like a relational database with loading relations and joining them) you very quickly start working against couchdb. i&#8217;m not talking about losing a bit of performance here and there (btw. i love how ativerecord abstracts away sql for me) but about missing the whole concept of how couchdb works.</p>
<p>to your document/comments example: suppose you want to show a list of documents with the number of comments on each. what you would do with activerecord is to load the documents first and then load all the comments to all the documents in order to count them (you would optimize this at some point and do a custom sql query that counts for you but that is something activerecord doesn&#8217;t help you with). now if you insist on doing this in couchdb the same way you are missing the fact that with more direct access to the couchdb API this would have been trivial and most efficient from the start without even thinking about optimizations. by keeping to the activerecord way you create yourself a class of problems you shouldn&#8217;t even have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: j chris a</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-821</link>
		<dc:creator>j chris a</dc:creator>
		<pubDate>Sun, 29 Mar 2009 20:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-821</guid>
		<description>I prefer to have CouchDB handle valudations. Also many apps tend to cross languages so any business logic in your Ruby model will be lost when connecting from JS or python.</description>
		<content:encoded><![CDATA[<p>I prefer to have CouchDB handle valudations. Also many apps tend to cross languages so any business logic in your Ruby model will be lost when connecting from JS or python.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: p3t0r</title>
		<link>http://www.rowtheboat.com/archives/37/comment-page-1#comment-817</link>
		<dc:creator>p3t0r</dc:creator>
		<pubDate>Sun, 29 Mar 2009 15:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rowtheboat.com/?p=37#comment-817</guid>
		<description>Eventhough I wouldn&#039;t want to use an ORM to work with couchdb I think you have some valid points in your argumentation. I really think usage patterns can (and should) be different in different cases. In lucene-land similar different solutions emerged... and they seem to co-exist... something about using te best tools foor the given problem!</description>
		<content:encoded><![CDATA[<p>Eventhough I wouldn&#8217;t want to use an ORM to work with couchdb I think you have some valid points in your argumentation. I really think usage patterns can (and should) be different in different cases. In lucene-land similar different solutions emerged&#8230; and they seem to co-exist&#8230; something about using te best tools foor the given problem!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.561 seconds -->
