Re: Arbitrary Constraints

From: Laconic2 <laconic2_at_comcast.net>
Date: Tue, 26 Oct 2004 07:52:24 -0400
Message-ID: <OcudnUXja-UYp-PcRVn-tA_at_comcast.com>


> This may be a can of worms in asking for more constraint examples, because
I
> may have to fend off a lot of constraints that could be dealt with with
RI,
> but what I think I'm looking for are the very simple cases that are not
> obviously structural, like simple credit limits, inventory >= 0 and so
> forth.

Speaking of cans of worms...

A little while ago, we were talking about whether DDL has to be expressed as code, or whether it can be rendered as meta-data. Your points were quite persuasive in that topic.

I also mentioned a "diff engine" that I built with regard to tables, columns, domains, and datatypes in DEC Rdb a few years back. I mentioned that I didn't take on constraints, because that would have been considerably more ambitious.

Combining those two threads and this one, here's what I weave. DEC Rdb has a limited number of types of constraints. These can be declared via the DDL under create or alter table. I'm pretty sure that, when Rdb "executes" this DDL, it turns the constraints into meta-data, rather thoroughly. The internal constraint checker contains built in code, but that's beside the point. The constraint checker is table driven, and it's event driven.

So, if I wanted to do an exhaustive study of the available constraint space in Rdb, from a data centric point of view, I'd probably try to understand all the system tables that have to do with constraints. This is complicated, because the constraint checker needs to know not only WHAT to check, but also WHEN to check it. And it also needs to do this with nearly minimal overhead, in situations where no constraints need to be checked.

So the constraint data in the system tables is a little subtle, and would be a little work for me to understand. That's why I didn't tackle it on the customer's dime, back when I built the diff engine.

All of this has almost nothing to do with generating the kind of examples you asked for. But if I understood the space of possible constraints in Rdb, it would help me to generate examples that are merely points in that space. It's thinking from the general to the specific, rather than the other way around. Does this make any sense at all? Received on Tue Oct 26 2004 - 13:52:24 CEST

Original text of this message