<?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: Go On, Convince Me</title>
	<atom:link href="http://third-bit.com/blog/archives/970.html/feed" rel="self" type="application/rss+xml" />
	<link>http://third-bit.com/blog/archives/970.html</link>
	<description>Data is ones and zeroes &#124; Software is ones and zeroes and hard work.</description>
	<lastBuildDate>Thu, 24 May 2012 15:30:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: www.crankycoder.com &#187; Blog Archive &#187; Databases == PAIN</title>
		<link>http://third-bit.com/blog/archives/970.html#comment-1155</link>
		<dc:creator>www.crankycoder.com &#187; Blog Archive &#187; Databases == PAIN</dc:creator>
		<pubDate>Thu, 05 Jul 2007 22:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://pyre.third-bit.com/blog/archives/970.html#comment-1155</guid>
		<description>[...] On Greg&#8217;s weblog, Alex Krizhevsky writes: I’m still having trouble convincing myself that these things offer a distinct advantage over plain-old SQL, at least when we have to write the object definitions by hand. That’s a pain. [...]</description>
		<content:encoded><![CDATA[<p>[...] On Greg&#8217;s weblog, Alex Krizhevsky writes: I’m still having trouble convincing myself that these things offer a distinct advantage over plain-old SQL, at least when we have to write the object definitions by hand. That’s a pain. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lilian Hanna</title>
		<link>http://third-bit.com/blog/archives/970.html#comment-1154</link>
		<dc:creator>Lilian Hanna</dc:creator>
		<pubDate>Wed, 13 Jun 2007 15:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://pyre.third-bit.com/blog/archives/970.html#comment-1154</guid>
		<description>Hi,
so I won&#039;t convince you that ORMs are awesome, I am just going to address some of the issues you mentioned here that made you think otherwise. I&#039;ve only worked with SQLAlchemy and I heard that it is one of the best ones out there.

So, to address your first point, you can load the tables from the db into an object without having to define an object to do that by using autoLoad=True when creating the Table object. The only problem with this is that you have to stick to the names of fields used in the db tables to access the object&#039;s attributes.

In regards to portability, I think one main advantage of using ORMs is portability. If you had used an ORM from the start, the switch from one DBMS to another is just a change in a few lines of code. I have used SQLAlchemy in the past and didn&#039;t really find the need to switch to another ORM, so it&#039;s highly unlikely you will need to switch to another ORM which took the most effort in your case.

I can not agree with you more on not trusting the SQL generated by ORMs. I don&#039;t think it is query efficient. I also hate the fact that you can&#039;t express complex queries, which you will have to write! SQLAlchemy gives you the option of executing plain SQL queries (some execute() method) but I would have liked to stick to only one method.

An advantage of ORMs is that they make your code more readable and for a developer who is not too experienced with SQL, generating SQL queries is like calling object methods so it relies on familiar concepts.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
so I won&#8217;t convince you that ORMs are awesome, I am just going to address some of the issues you mentioned here that made you think otherwise. I&#8217;ve only worked with SQLAlchemy and I heard that it is one of the best ones out there.</p>
<p>So, to address your first point, you can load the tables from the db into an object without having to define an object to do that by using autoLoad=True when creating the Table object. The only problem with this is that you have to stick to the names of fields used in the db tables to access the object&#8217;s attributes.</p>
<p>In regards to portability, I think one main advantage of using ORMs is portability. If you had used an ORM from the start, the switch from one DBMS to another is just a change in a few lines of code. I have used SQLAlchemy in the past and didn&#8217;t really find the need to switch to another ORM, so it&#8217;s highly unlikely you will need to switch to another ORM which took the most effort in your case.</p>
<p>I can not agree with you more on not trusting the SQL generated by ORMs. I don&#8217;t think it is query efficient. I also hate the fact that you can&#8217;t express complex queries, which you will have to write! SQLAlchemy gives you the option of executing plain SQL queries (some execute() method) but I would have liked to stick to only one method.</p>
<p>An advantage of ORMs is that they make your code more readable and for a developer who is not too experienced with SQL, generating SQL queries is like calling object methods so it relies on familiar concepts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wolever</title>
		<link>http://third-bit.com/blog/archives/970.html#comment-1153</link>
		<dc:creator>David Wolever</dc:creator>
		<pubDate>Wed, 13 Jun 2007 03:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://pyre.third-bit.com/blog/archives/970.html#comment-1153</guid>
		<description>Well, I&#039;ll speak from the limited experience that I have: a couple (5 or 6) little PHP scripts that use SQL, three little Alchemy projects and then DrProject.

When I think back and compare the ordeal I went through with my first couple PHP/MySQL scripts to the hack jobs that were my first couple Alchemy apps, the clear winner is raw SQL.  It doesn&#039;t take much time to learn enough SQL to get by, and it usually does about what you expect it to.

Compare that with Alchemy, which has a steeper (although not altogether terrible) learning curve and makes you as a programmer feel terrible because you have no idea what on Earth is happening, things just magically work (most of the time).

But, from my experience with Drproject, there is one huge advantage that ORMs have over SQL when you&#039;re working with a large project: the database is one less thing you have to think about.

When I&#039;m coding, I don&#039;t want to think about database schemas, table and row names, left joins and select unions.  I just want an object with data.  I want to know is that a Ticket object has an owner, and that owner is a Person, and if I change the owner, the database will change too.

Now, I suppose you could write some methods in the object that let you create the object from the database, so the &quot;end developer&quot; doesn&#039;t need to think in SQL... But isn&#039;t that what Alchemy does?

It also strikes me as a BadThing™ that the code knows about the inner workings of the database... But I can&#039;t think of any good examples off the top of my tired head.

Maybe ask your dad?</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;ll speak from the limited experience that I have: a couple (5 or 6) little PHP scripts that use SQL, three little Alchemy projects and then DrProject.</p>
<p>When I think back and compare the ordeal I went through with my first couple PHP/MySQL scripts to the hack jobs that were my first couple Alchemy apps, the clear winner is raw SQL.  It doesn&#8217;t take much time to learn enough SQL to get by, and it usually does about what you expect it to.</p>
<p>Compare that with Alchemy, which has a steeper (although not altogether terrible) learning curve and makes you as a programmer feel terrible because you have no idea what on Earth is happening, things just magically work (most of the time).</p>
<p>But, from my experience with Drproject, there is one huge advantage that ORMs have over SQL when you&#8217;re working with a large project: the database is one less thing you have to think about.</p>
<p>When I&#8217;m coding, I don&#8217;t want to think about database schemas, table and row names, left joins and select unions.  I just want an object with data.  I want to know is that a Ticket object has an owner, and that owner is a Person, and if I change the owner, the database will change too.</p>
<p>Now, I suppose you could write some methods in the object that let you create the object from the database, so the &#8220;end developer&#8221; doesn&#8217;t need to think in SQL&#8230; But isn&#8217;t that what Alchemy does?</p>
<p>It also strikes me as a BadThing™ that the code knows about the inner workings of the database&#8230; But I can&#8217;t think of any good examples off the top of my tired head.</p>
<p>Maybe ask your dad?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrey</title>
		<link>http://third-bit.com/blog/archives/970.html#comment-1152</link>
		<dc:creator>Andrey</dc:creator>
		<pubDate>Wed, 13 Jun 2007 02:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://pyre.third-bit.com/blog/archives/970.html#comment-1152</guid>
		<description>1. http://erosson.com/migrate/trac/
2.0. MySQL vs PostgreSQL, maybe. Try building a compatibility layer between MySQL and SQLite.
2.1. Code reuse. Define your model once, and have all your favourite modules use it and the common codebase for accessing the database... If you&#039;re going to say &quot;I could do that anyways by writing a central library&quot;, then you&#039;re just reinventing what SQLAlchemy provides.
2.2. Plus, it&#039;s fun to tell it to join five different tables and having it know exactly what keys to join on. Or better yet, let it figure out on its own that some joins are required in order to get the data you need.
3. engine.echo = True, or get familiar with what each method does and you&#039;ll know how it&#039;s going to build the query.

There&#039;s a ton of other reasons, many of which are listed on the front page: http://www.sqlalchemy.org/</description>
		<content:encoded><![CDATA[<p>1. <a href="http://erosson.com/migrate/trac/" rel="nofollow">http://erosson.com/migrate/trac/</a><br />
2.0. MySQL vs PostgreSQL, maybe. Try building a compatibility layer between MySQL and SQLite.<br />
2.1. Code reuse. Define your model once, and have all your favourite modules use it and the common codebase for accessing the database&#8230; If you&#8217;re going to say &#8220;I could do that anyways by writing a central library&#8221;, then you&#8217;re just reinventing what SQLAlchemy provides.<br />
2.2. Plus, it&#8217;s fun to tell it to join five different tables and having it know exactly what keys to join on. Or better yet, let it figure out on its own that some joins are required in order to get the data you need.<br />
3. engine.echo = True, or get familiar with what each method does and you&#8217;ll know how it&#8217;s going to build the query.</p>
<p>There&#8217;s a ton of other reasons, many of which are listed on the front page: <a href="http://www.sqlalchemy.org/" rel="nofollow">http://www.sqlalchemy.org/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

