Search Postgresql Archives

Re: Polymorphic delete help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/6/07, David Fetter <david@xxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux