From: | "Alexander Staubo" <alex(at)purefiction(dot)net> |
---|---|
To: | "David Fetter" <david(at)fetter(dot)org> |
Cc: | "Perry Smith" <pedz(at)easesoftware(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Polymorphic delete help needed |
Date: | 2007-07-06 20:20:09 |
Message-ID: | 88daf38c0707061320l5774004ajd48708d4b1c97647@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7/6/07, David Fetter <david(at)fetter(dot)org> wrote:
> At some point, you're going to realize that Rails is the problem, not
> the solution. It's written by people who do not understand what a
> shared data store is and reflects problems inherent in its native
> database platform: MySQL 3.23.
This is rampant FUD; generalizations such as these help nobody. There
are plenty of developers, myself included, who use Rails in a
relational way, with relational integrity, transactions and normalized
schemas, none of which are particularly hampered by Rails' MySQLisms.
On the other hand, it is true that ActiveRecord lacks some tools out
of the box -- for example, model-level foreign key constraints are
accessible through a plugin you need to install separately. It is also
true that some of ActiveRecord's mechanisms are less than clean,
polymorphic associations in particular.
Keep in mind that ActiveRecord is an object-relational mapper. There
is the well-known impedance mismatch between object-oriented
programming and the relational model, one that is not trivially
overcome (the view-based example cited earlier in this thread is a
paticularly egregious example of a non-trivial solution).
Polymorphic associations is a practical solution that compromises
relational purity for performance and ease of implementation, and it
could be argued that it's a "good enough" solution for many
developers, who are ultimately interested in getting things done, even
if they "do not understand what a shared data store is".
ActiveRecord's polymorphism can be explained on a paper napkin; I
haven't encountered a purely relational solution in this thread that
fits this description.
Alexander.
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2007-07-06 22:07:22 | Re: ISO TESTS for a Pg lexer+parser |
Previous Message | Dmitry Koterov | 2007-07-06 20:06:11 | Update a single row without firing its triggers? |