[Seaside] How do you handle constraints on persisted collections?

Michael Forster mike at sharedlogic.ca
Wed May 20 13:14:41 UTC 2009

On Wed, May 20, 2009 at 7:56 AM, Marcin Tustin <mm3 at zepler.net> wrote:
> Surely much of this code would need to be written anyway, in order to
> unit test, and verify that the system is mapping properly with the
> database?

I didn't say that the ORM code is small or trivial. I suggested that a
point may be reached where it is smaller and/or simpler than
implementing constraints (and many other DBMS features) by hand. For
comparison, implementing constraints procedurally via SQL triggers is
far more verbose, time-consuming, and dangerous than a one-line SQL
key or check declaration.  That most SQL DBMSs do not provide the full
range of constraint declarations prescribed by the Relational Model is
a short-coming of the former, not the latter.

In my experience, your conjecture bears out in small systems where the
number and complexity of constraints required is low.  However, I have
seen very few such systems stay that way for long.  Customers throw
all kinds of business rules at you.


More information about the seaside mailing list