<?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: Rails and the notion of Stupid Databases Being a Good Idea</title>
	<atom:link href="http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/</link>
	<description>Jamie Flournoy's Software Development Blog</description>
	<lastBuildDate>Fri, 19 Mar 2010 02:13:16 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Giles Bowkett</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-347</link>
		<dc:creator>Giles Bowkett</dc:creator>
		<pubDate>Mon, 06 Aug 2007 19:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-347</guid>
		<description>Rails is designed for a particular problem space and handles that problem space very well. It&#039;s very easy to extend it beyond its typical range when necessary but getting buy-in for that at a core level can be difficult because generally the Rails core team concerns itself with 37 Signals -sized problems rather than enterprise-sized problems.

The assumption with Rails is that you can divert requests within the community for design changes into plugin development. That&#039;s mostly true, except that it effectively limits the size and extent of such changes. If you want to add brains to a database which is otherwise totally &quot;normal&quot; from Rails&#039; point of view, the question is whether the project is as huge and twisted as adding brains to the Frankenstein monster, or if it&#039;s just a matter of writing some good plugins.

There&#039;s no doubt that you will find a lot of younger Rails developer espousing good practices, and being very proud of it, without entirely understanding them. That&#039;s actually a huge improvement from a few years ago, when the average developer disparaged or ignored good practices without understanding them. It&#039;s true that the Rails community gets incredibly annoying sometimes, but it&#039;s also true that Rails is a thing of beauty.</description>
		<content:encoded><![CDATA[<p>Rails is designed for a particular problem space and handles that problem space very well. It&#8217;s very easy to extend it beyond its typical range when necessary but getting buy-in for that at a core level can be difficult because generally the Rails core team concerns itself with 37 Signals -sized problems rather than enterprise-sized problems.</p>
<p>The assumption with Rails is that you can divert requests within the community for design changes into plugin development. That&#8217;s mostly true, except that it effectively limits the size and extent of such changes. If you want to add brains to a database which is otherwise totally &#8220;normal&#8221; from Rails&#8217; point of view, the question is whether the project is as huge and twisted as adding brains to the Frankenstein monster, or if it&#8217;s just a matter of writing some good plugins.</p>
<p>There&#8217;s no doubt that you will find a lot of younger Rails developer espousing good practices, and being very proud of it, without entirely understanding them. That&#8217;s actually a huge improvement from a few years ago, when the average developer disparaged or ignored good practices without understanding them. It&#8217;s true that the Rails community gets incredibly annoying sometimes, but it&#8217;s also true that Rails is a thing of beauty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CG</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-341</link>
		<dc:creator>CG</dc:creator>
		<pubDate>Mon, 06 Aug 2007 11:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-341</guid>
		<description>@mike bayer

Yes there are alternatives like Java and .net, kind of like democrats and republicans. If Ruby users didn&#039;t think there was anything else they would be - Java ROFs (Religious Old Farts) - instead of the affectionately named fanboys we have been coined - hey we didn&#039;t start the name calling.

BTW composite PKs are a great theory but in implementation they are a continuous cause of heart burn and refactoring that will haunt you until the product is retired - regardless of the language you are using. If you haven&#039;t learned this yet you have been fortunately enough not to have had to maintain hundreds of thousands of lines of code using schemas written by someone else in your career. That being said Dr Nic has provided a plug-in to provide to handle this in AR for legacy applications. There are also plug-ins to handle stored procs and foreign keys and other aspects that you mention - had you bothered to look inside the Ruby world instead reaching for your favorite hammer to make everything look like a nail.

Your right this article wasn&#039;t written for you, take a couple of aspirin and get over it.</description>
		<content:encoded><![CDATA[<p>@mike bayer</p>
<p>Yes there are alternatives like Java and .net, kind of like democrats and republicans. If Ruby users didn&#8217;t think there was anything else they would be &#8211; Java ROFs (Religious Old Farts) &#8211; instead of the affectionately named fanboys we have been coined &#8211; hey we didn&#8217;t start the name calling.</p>
<p>BTW composite PKs are a great theory but in implementation they are a continuous cause of heart burn and refactoring that will haunt you until the product is retired &#8211; regardless of the language you are using. If you haven&#8217;t learned this yet you have been fortunately enough not to have had to maintain hundreds of thousands of lines of code using schemas written by someone else in your career. That being said Dr Nic has provided a plug-in to provide to handle this in AR for legacy applications. There are also plug-ins to handle stored procs and foreign keys and other aspects that you mention &#8211; had you bothered to look inside the Ruby world instead reaching for your favorite hammer to make everything look like a nail.</p>
<p>Your right this article wasn&#8217;t written for you, take a couple of aspirin and get over it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jc</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-333</link>
		<dc:creator>jc</dc:creator>
		<pubDate>Sun, 05 Aug 2007 21:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-333</guid>
		<description>Great post Jamie. I agree with it, however using the Rails approach of not worrying about data integrity makes development really, really fast. That&#039;s a good thing, but no excuse for ignoring data integrity. Luckily, I think this fits in with the whole &quot;Premature Optimization&quot;. Build the app, then once its working and unit tested, optimize the heck out of it including adding all the database level integrity checks (along with ruby unit tests to verify).</description>
		<content:encoded><![CDATA[<p>Great post Jamie. I agree with it, however using the Rails approach of not worrying about data integrity makes development really, really fast. That&#8217;s a good thing, but no excuse for ignoring data integrity. Luckily, I think this fits in with the whole &#8220;Premature Optimization&#8221;. Build the app, then once its working and unit tested, optimize the heck out of it including adding all the database level integrity checks (along with ruby unit tests to verify).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-330</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Sun, 05 Aug 2007 11:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-330</guid>
		<description>I think Rails is more about preventing premature optimization. There are  lot of articles about scaling a Rails app and it is obvious that you check your logs, profile your app and of course do your DB engineering! When there are bottlenecks, why don&#039;t use a stored procedure? The question is, _when_ to do that. Most of the apps never get that big. And when they do, you have the scaling issue with every technology.
The productivity with Rails (because of Ruby) is so much higher that you can do optimizations when needed. When you do premature optimization by using a big upfront db design and bloated technology and methodology chances are big, that the project never gets done. In these cases its almost better to start with light-weight frameworks like Rails and rewrite the app or parts of the app when nessecary.</description>
		<content:encoded><![CDATA[<p>I think Rails is more about preventing premature optimization. There are  lot of articles about scaling a Rails app and it is obvious that you check your logs, profile your app and of course do your DB engineering! When there are bottlenecks, why don&#8217;t use a stored procedure? The question is, _when_ to do that. Most of the apps never get that big. And when they do, you have the scaling issue with every technology.<br />
The productivity with Rails (because of Ruby) is so much higher that you can do optimizations when needed. When you do premature optimization by using a big upfront db design and bloated technology and methodology chances are big, that the project never gets done. In these cases its almost better to start with light-weight frameworks like Rails and rewrite the app or parts of the app when nessecary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-08-05 &#171; Mike Does Tech</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-321</link>
		<dc:creator>links for 2007-08-05 &#171; Mike Does Tech</dc:creator>
		<pubDate>Sun, 05 Aug 2007 00:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-321</guid>
		<description>[...] Pervasive Code » Blog Archive » Rails and the notion of Stupid Databases Being a Good Idea (tags: rubyonrails database activerecord programming) [...]</description>
		<content:encoded><![CDATA[<p>[...] Pervasive Code » Blog Archive » Rails and the notion of Stupid Databases Being a Good Idea (tags: rubyonrails database activerecord programming) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike bayer</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-320</link>
		<dc:creator>mike bayer</dc:creator>
		<pubDate>Sat, 04 Aug 2007 23:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-320</guid>
		<description>hey tim-

we are talking here about activerecord, and how its a crappy product which ignores basic tenets of relational theory; whose community, when presented with these notions, instead of taking on the challenge of improving the product, or ever spending *30 seconds* to look at *anything* which is not rails, defends its mediocre design with lame ideas like using triggers in place of foreign keys and proclaiming composite primary keys as a poor design idea.  None of this has anything to do with &quot;me&quot;; we aren&#039;t talking about &quot;me&quot; here.  So thanks to your response I guess we&#039;re also now talking about the phenomenon of wagon-circling, ad-hominem diversionary bullcrap that inevitably arises in any attempt to seriously question any aspect of rails.</description>
		<content:encoded><![CDATA[<p>hey tim-</p>
<p>we are talking here about activerecord, and how its a crappy product which ignores basic tenets of relational theory; whose community, when presented with these notions, instead of taking on the challenge of improving the product, or ever spending *30 seconds* to look at *anything* which is not rails, defends its mediocre design with lame ideas like using triggers in place of foreign keys and proclaiming composite primary keys as a poor design idea.  None of this has anything to do with &#8220;me&#8221;; we aren&#8217;t talking about &#8220;me&#8221; here.  So thanks to your response I guess we&#8217;re also now talking about the phenomenon of wagon-circling, ad-hominem diversionary bullcrap that inevitably arises in any attempt to seriously question any aspect of rails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Jempty</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-317</link>
		<dc:creator>George Jempty</dc:creator>
		<pubDate>Sat, 04 Aug 2007 21:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-317</guid>
		<description>Rails suffers from the &quot;All Web Development is New Development&quot; anti-pattern; see http://www.devpapers.com/article/259/1</description>
		<content:encoded><![CDATA[<p>Rails suffers from the &#8220;All Web Development is New Development&#8221; anti-pattern; see <a href="http://www.devpapers.com/article/259/1" rel="nofollow">http://www.devpapers.com/article/259/1</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-314</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 04 Aug 2007 17:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-314</guid>
		<description>Thank you for this article.  Rails is definitely a neat technology and probably can help people build nifty applications in a short time, but ultimately if you want to build a database-backed app you really need to grok the database.  These frameworks that intentionally obscure the database so that you barely know will only lead to trouble in the long run as your &quot;dumb&quot; queries start piling up.  Sprocs are a good thing!</description>
		<content:encoded><![CDATA[<p>Thank you for this article.  Rails is definitely a neat technology and probably can help people build nifty applications in a short time, but ultimately if you want to build a database-backed app you really need to grok the database.  These frameworks that intentionally obscure the database so that you barely know will only lead to trouble in the long run as your &#8220;dumb&#8221; queries start piling up.  Sprocs are a good thing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim O'Brien</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-313</link>
		<dc:creator>Tim O'Brien</dc:creator>
		<pubDate>Sat, 04 Aug 2007 17:01:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-313</guid>
		<description>@mike bayer,

please! WTF, SQLAlchemy and Pylons are better than Rails, which is only for people who haven&#039;t realized the true power of the database.   God, those head bangers.  sorry, the world isn&#039;t as smart as you Mike.  

@jamie,

Yeah, it&#039;s an opinion, i&#039;m not disagreeing, but I also don&#039;t think it matters.   You can use Rails with a database that has stored procedures, foreign keys, triggers, different transaction isolation levels.   It takes a little bit of work, but you can do it.   As far as the &quot;simple database approach&quot;?   It&#039;s the right choice for some applications, maybe not the applications you or I work on, but let bygones be bygones

Also, you seem to be determined to attack programmers who are defending the hill they happen to be standing on.   I&#039;ve seen it work both ways, very dogmatic DBAs defending Stored procedures against anything even resembling an ORM, and java programmers running around saying things like, &quot;The database should be dumb&quot;.   Both side of the debate are wrong, the right answer is invariably:  &quot;do whatever gets the job done with the people currently at hand&quot;.

But, to actually take a stand, i&#039;ll say this.   Stored procedures, OLAP, what have you are great ideas if the application demands them, but more often than not a problem can be solved with the simplest of tools.   The challenge is knowing when to abandon the idea of stupid databases, and I think this is the problem you&#039;ve identified.   Stupid databases make sense for the simplest of application, but programmers tend to be dogmatic, so you end up with a whole department of hypnotized agilists holding on to the idea even in the face of conflicting evidence.

the problem isn&#039;t stupid databases per se.  the problem is dogmatic adherence to anything not founded on real experience.   There are parts of agile mumbo-jumbo that make some sense, but 9 times out of 10, some 20 year old reads some Agile manifesto book and suddenly thinks that they have the 20/20 vision of a 30 year industry veteran - &quot;Oh, we don&#039;t need triggers or views, blah blah blah....&quot;  Where the 30 year veteran would actually end up saying...&quot;Hmmmm....as a general rule, Stored Procs are not the first choice, but when we need them, let&#039;s not rule them out.&quot;    

but, for the record, Rails is great.  I&#039;m sorry, but it just is.</description>
		<content:encoded><![CDATA[<p>@mike bayer,</p>
<p>please! WTF, SQLAlchemy and Pylons are better than Rails, which is only for people who haven&#8217;t realized the true power of the database.   God, those head bangers.  sorry, the world isn&#8217;t as smart as you Mike.  </p>
<p>@jamie,</p>
<p>Yeah, it&#8217;s an opinion, i&#8217;m not disagreeing, but I also don&#8217;t think it matters.   You can use Rails with a database that has stored procedures, foreign keys, triggers, different transaction isolation levels.   It takes a little bit of work, but you can do it.   As far as the &#8220;simple database approach&#8221;?   It&#8217;s the right choice for some applications, maybe not the applications you or I work on, but let bygones be bygones</p>
<p>Also, you seem to be determined to attack programmers who are defending the hill they happen to be standing on.   I&#8217;ve seen it work both ways, very dogmatic DBAs defending Stored procedures against anything even resembling an ORM, and java programmers running around saying things like, &#8220;The database should be dumb&#8221;.   Both side of the debate are wrong, the right answer is invariably:  &#8220;do whatever gets the job done with the people currently at hand&#8221;.</p>
<p>But, to actually take a stand, i&#8217;ll say this.   Stored procedures, OLAP, what have you are great ideas if the application demands them, but more often than not a problem can be solved with the simplest of tools.   The challenge is knowing when to abandon the idea of stupid databases, and I think this is the problem you&#8217;ve identified.   Stupid databases make sense for the simplest of application, but programmers tend to be dogmatic, so you end up with a whole department of hypnotized agilists holding on to the idea even in the face of conflicting evidence.</p>
<p>the problem isn&#8217;t stupid databases per se.  the problem is dogmatic adherence to anything not founded on real experience.   There are parts of agile mumbo-jumbo that make some sense, but 9 times out of 10, some 20 year old reads some Agile manifesto book and suddenly thinks that they have the 20/20 vision of a 30 year industry veteran &#8211; &#8220;Oh, we don&#8217;t need triggers or views, blah blah blah&#8230;.&#8221;  Where the 30 year veteran would actually end up saying&#8230;&#8221;Hmmmm&#8230;.as a general rule, Stored Procs are not the first choice, but when we need them, let&#8217;s not rule them out.&#8221;    </p>
<p>but, for the record, Rails is great.  I&#8217;m sorry, but it just is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/comment-page-1/#comment-312</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 04 Aug 2007 15:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2007/08/02/rails-and-the-notion-of-stupid-databases-being-a-good-idea/#comment-312</guid>
		<description>I do believe I disagree. Stored procedures in a database are almost always a bad idea. If you&#039;re writing a thin web application, you can put the logic in your code, abstracted cleanly into a library. If you&#039;re writing an enterprise app with many possible clients, you should go the full three-tier route, and make a proper application server. 

Either way, the layer (library or application server) handles data consistency for you, in the same way that stored procedures would. You do, however, get to write it in a real language, instead of some poorly designed stored procedure language. You don&#039;t tie yourself to one database (or at least, not as strongly). This is especially an issue if you&#039;re writing an application used in more than one place (I.E. a product you sell to customers, as opposed to a product used by a single organization). You can also higher more general-purpose software engineers, who tend to be cheaper, smarter, and easier to find than Oracle engineers.</description>
		<content:encoded><![CDATA[<p>I do believe I disagree. Stored procedures in a database are almost always a bad idea. If you&#8217;re writing a thin web application, you can put the logic in your code, abstracted cleanly into a library. If you&#8217;re writing an enterprise app with many possible clients, you should go the full three-tier route, and make a proper application server. </p>
<p>Either way, the layer (library or application server) handles data consistency for you, in the same way that stored procedures would. You do, however, get to write it in a real language, instead of some poorly designed stored procedure language. You don&#8217;t tie yourself to one database (or at least, not as strongly). This is especially an issue if you&#8217;re writing an application used in more than one place (I.E. a product you sell to customers, as opposed to a product used by a single organization). You can also higher more general-purpose software engineers, who tend to be cheaper, smarter, and easier to find than Oracle engineers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
