Re: Multiple specification of constraints

From: Dawn M. Wolthuis <dwolt_at_tincat-group.com>
Date: Fri, 5 Mar 2004 14:41:52 -0600
Message-ID: <c2aoml$uik$1_at_news.netins.net>


"Eric Kaun" <ekaun_at_yahoo.com> wrote in message news:LbG1c.30934$pB7.29337_at_newssvr16.news.prodigy.com...
> "Dawn M. Wolthuis" <dwolt_at_tincat-group.com> wrote in message
> news:c25cbc$1c0$1_at_news.netins.net...
> > There are definitely local constraints for specific applications that
> would
> > not be specified as global constraints.
>
> No, there aren't. If app X deals with a completely different set of data
> than app Y, then you can easily apply each app's "individual constraints"
as
> global ones, qualified by the subset predicates. And if they deal with the
> same data, then you can't have X writing data that violates Y's
constraints,
> can you? That would be nonsense.
>
> Do you have an example? If you're talking about simple data
transformation,
> then calculating f(a) requires that a meets its constraints, and if you're
> storing results in b, that f(a) meet the appropriate constraints for b.
>
> I'm not sure where the need for this division is.

I think we agree that all constraints can be seen as constraints on the data globally by simply narrowing the scope of the constraint. However, this is what I have seen happen -- tell me if you do not think this is the norm:

Data get specified in requirements, we normalize them and stick 'em in schemas, with constraints and all. Then somewhere in the life of the database, changes are made to the initial applications or new applications are built where the database constraints are necessary but not sufficient for taking in the data properly from a user, for example.

Let's say that the developer and DBA get along (there have been cases, as I understand it) and when a constraint allows for all real numbers to two decimal positions and it is determined that the requirements change so we are going to collect only whole numbers, the database constraints are changed. However, even this programmer, when coding a portion of the overall application that is used only by the xyz department where the value of this attribute must be between 2 & 5 simply adds the logic into that application for this restriction rather than having any change made at the database level.

Does this still happen in real software development today or am I stuck in the 80's? If it does, you might think that the answer is to get the programmers to do things right. Ah, but there are ways to provide carots rather than sticks even for developers. If a software developer can handily change a constraint they write but can't easily change one they don't, then guess what?

smiles. --dawn Received on Fri Mar 05 2004 - 21:41:52 CET

Original text of this message