Re: multimaster - Mailing list pgsql-general

From Ian Harding
Subject Re: multimaster
Date
Msg-id 725602300706030848g4b44856ai46278305b1497572@mail.gmail.com
Whole thread Raw
In response to Re: multimaster  ("Alexander Staubo" <alex@purefiction.net>)
List pgsql-general
On 6/2/07, Alexander Staubo <alex@purefiction.net> wrote:
> On 6/2/07, Martijn van Oosterhout <kleptog@svana.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

pgsql-general by date:

Previous
From: "Alexander Staubo"
Date:
Subject: Re: multimaster
Next
From: Ron Johnson
Date:
Subject: Re: general features