Re: multimaster

From: "Ian Harding" <harding(dot)ian(at)gmail(dot)com>
To: "Alexander Staubo" <alex(at)purefiction(dot)net>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Andrew Sullivan" <ajs(at)crankycanuck(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: multimaster
Date: 2007-06-03 15:48:51
Message-ID: 725602300706030848g4b44856ai46278305b1497572@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/2/07, Alexander Staubo <alex(at)purefiction(dot)net> wrote:
> On 6/2/07, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> > I don't know if it's a general problem, but I've been involved in a
> > using rails and it appears to have it's own way of declaring the
> > database. It presumes to handle referential integrity and uniqueness in
> > the application code (!).
>
> I think you've been misled. True, Rails/ActiveRecord does bear the
> signs of having been designed for MySQL/MyISAM, which has neither
> transactions nor referential integrity, but this does not mean that
> Rails does not support these constructs, or that Rails users don't use
> them. I value my data integrity, so all my relations have RI, unique
> constraints, null constraints, etc. as in any well-designed schema.
>

Rails propaganda explicitly proposes not "repeating yourself" and
since the RI constraints are defined in the rails models, and they are
enforced in the framework with a graceful feedback mechanism for
users, they implicitly denigrate defining constraints in the DB as
"Repeating yourself."

The creator of RoR explicitly discourages use of RI, rules, triggers,
etc in the database as unnecessary. His disciples take this as
gospel.

I have used rails for a couple projects and I repeated myself
religiously in database constraints. This revealed a couple
disturbing properties of rails that made me not want to use it,
notably, assuming an empty input box equates to an empty string vice
null for text data types, even if the table is defined as accepting
nulls.

- Ian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lew 2007-06-03 17:22:29 Re: There can be only one! How to avoid the "highlander-problem".
Previous Message Ron Johnson 2007-06-03 15:47:27 Re: general features