Ruby + Postgres = Bad Idea or Good Idea?

On Sat, Apr 18, 2009 at 9:27 AM, Michael S. [email protected]
wrote:

From my experience, your
accusation of the PostgreSQL tools being “awkward, clumsy and unhelpful”
appears to be unsubstantiated.

Dude, don’t get your knickers in a twist.

I made a comment, not an “accusation”, and there’s hardly anything
to “substantiate” when we’re discussing opinions.

You like the pg* tools, I don’t. YMMV. Go and be happy. Geez…


Hassan S. ------------------------ [email protected]

Glad to see that you’ve settled on Postgresql. I think the contractor
who insists on using MySQL rather than Postgres is probably a bit
immature in their DB experience.

I came to Ruby from a Delphi/Interbase/MSSQL environment and started
using MySQL because it was the default. It was OK but I quickly found
problems with queries that just worked on other DB engines because they
assumed the SQL-92 standard, but they failed on MySQL.

Anyway I’ve switched to Postgresql because it has much, much, much
better Geographical Information Services (GIS) support. MySQL has
geometry, but only on MyISAM and only flat geometry, not spherical
geometrey, duuuh!

MySQL is OK if you’re doing extremely simple stuff and like the herd
mentality around it.

There was just a podcast about this on SD Ruby.

http://sdruby.com/podcast/

I believe it is EP 55

On Mon, Apr 20, 2009 at 11:16 AM, Marnen Laibow-Koser
[email protected] wrote:

Yes, you have to understand the DB, but that often does not require
changes to well-written code. I have written and maintained complex
applications that were deployed on both mySQL and PostgreSQL, often
simultaneously. ActiveRecord really does insulate the developer
from a lot of DB-specific stuff – if the developer is smart and
writes DB-neutrally.

When you use standard AR associations – no custom SQL at all –
and it runs on one DB and fails on another, I’d say you need to know
a little more about those DBs. Wouldn’t you? :slight_smile:


Hassan S. ------------------------ [email protected]

Two small quibbles that I thought were just big enough to raise
here…

On Apr 17, 4:30 pm, Bill S. [email protected] wrote:

I think we will stick with our current plan, and usePostgresql. In
general, it makes me uncomfortable when developers refuse to use one
tool or another.

It depends on the developer. Good developers know what they’re
talking about, and their preferences can often tell you a lot about a
tool – and about their development practices – that you might not
otherwise know.

In other words, if a developer has a good reason for refusing to use
something, it may be to your advantage to find out what that reason
is.

It shouldn’t really matter. It’s the architecture
that really counts.

Perhaps, but in practice that’s not really true – details that are
computationally trivial can make a huge difference to developer
productivity. That’s why we don’t typically develop Web apps in C,
although it can be and has been done.

On Apr 17, 9:44 pm, Hassan S. [email protected]
wrote:
[…]

One thing to consider is that the idea that ActiveRecord just magically
insulates the developer from understanding the underlying database
is wishful thinking, once you get past your basic ‘hello world’ app.

Yes, you have to understand the DB, but that often does not require
changes to well-written code. I have written and maintained complex
applications that were deployed on both mySQL and PostgreSQL, often
simultaneously. ActiveRecord really does insulate the developer
from a lot of DB-specific stuff – if the developer is smart and
writes DB-neutrally. (I just took over maintenance of an app where
the developer didn’t do that…)

And part of being “smart” is understanding the underlying DB well
enough to know what’s portable and what isn’t.

So if someone knows MySQL well, s/he may not want to put the time
into learning the gotchas of another DB. I would charge more just to
cover the aggravation of using Postgres’s god-awful command line
tools. :slight_smile:

I never use the command-line tools, either with PostgreSQL or mySQL.
I don’t find either set to be very easy to use…that’s what graphical
admin programs are for.

(Maybe if I were a DBA, things would be different. But I just don’t
use the command-line tools often enough to remember syntax between
uses.)

Best,

Marnen Laibow-Koser
[email protected]
http://www.marnen.org

Here’s a quote from the February issue of Linux Journal (p69) that
might be of interest to you: “I use PostgreSQL as my database, as
I’ve decided to give PostgreSQL a go having read Reuven Lerner’s
excellent series of articles comparing PostgreSQL to MySQL (see the
April, May and June 2007 issues of LJ.)”

Especially significant, now that Oracle will own MySQL.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs