Re: transition constraints

From: Roy Hann <specially_at_processed.almost.meat>
Date: Wed, 14 Sep 2005 08:19:39 +0100
Message-ID: <8cydnXRp1NfqUrreRVnygw_at_pipex.net>


"Marshall Spight" <marshall.spight_at_gmail.com> wrote in message news:1126669192.772939.151080_at_g43g2000cwa.googlegroups.com...
> Hi all,
>
> I've never used transition constraints before. How
> useful are they? Do many constraints end up being
> transition constraints, or are they fairly rare?
>
> Have experience? Share!

I've done little more than play with them, for the purpose of producing some illustrations for a presentation. I have to say that even though I "knew" how they would work, seeing the effect for the first time brought a smile to my face.

I was using an SQL DBMS, so I had to roll my own TCs. I ran into a few problems that will prevent me from making any serious use of them in real production systems: (1) the DBMS I was using lacked the ability to defer constraint checking, which is always a problem when using constraints with SQL; (2) the SQL quickly becomes exceedingly verbose; (3) change-control and version management is a bear; (4)

Another early hiccup was that handling corrections/reversals to the database has to be thought out *very* carefully--it easy to create TCs that inadvertently prevent them. I don't want anyone to think the difficulty of handling reversals is an objection though. Any business process will have a way of handling a reversal, and the database design just has to implement it faithfully. Defining TCs simply compels one to pay proper attention to it--more perhaps than one is accustomed to getting away with. But that can only be a good thing.

Another surprising (to me) result of even my elementary experiments was the additional clarity TCs brought to the sometimes murky question of which entity types are distinct. When one has a number of provisional entity types that have the same attributes, the question of whether they are really one type can be settled by looking at the constraints. It seems intuitively obvious to me only now, that if one neglects one kind of constraint (the TCs) one will overlook distinctions and wrongly conflate types. Maybe it shouldn't have been such an epiphany to me, but I now feel that analysis of the TCs is one of the most powerful design aids I have.

So my answer to "how useful are they?", is: fantastically! I wish they were more easily usable with SQL. As to "are they fairly rare?", I just couldn't stop thinking up more and more once I started. In fact, I am coming to the opinion that if I could think up enough of them (and implement them), then the only thing left for the application to do would be to facilitate the workflow!

Roy Received on Wed Sep 14 2005 - 09:19:39 CEST

Original text of this message