Re: Clean Object Class Design -- What is it?

From: Bob Badour <bbadour_at_golden.net>
Date: 9 Jul 2001 18:14:47 -0700
Message-ID: <cd3b3cf.0107091714.7b967118_at_posting.google.com>


> > > insert(x,S) = union (S, {x})
> > > remove(x,S) = difference(S, {x})
> > > update(x,y,S) = insert(y, remove(x,S) )
> >
> > Ouch, completely obvious and I missed it. Relational algebra 101 and I
> > blew it utterly. I stand corrected.
>
> No, you were correct the first time. The "union" and "difference"
> operators shown above are not the basic set operations of set union
> and set difference that you are familiar with from set theory.

The person who posted the examples left out the crucial set-level assignment operation:

insert(x,S):
x = x union S

remove(x,S):
x = x difference S

In any case, regardless whether they are mathematical set operators, they are set-level operations in that they operate on sets, which allow the DBMS to determine the best algorithm to use for navigating and changing individual values. Contrast them with operations that operate on single records requiring user-specified navigation.

My original post did not claim they were mathematical set operators.

> The union and difference set operations with which we are
> familiar from set theory are dyadic *functions*. The operation
> union(A,B)
> defines a set in terms of the sets A and B. It does not "change"
> A or B in any way, since set notation like the rest of regular
> mathematics is referentially transparent.

This is a very important point, because (in my experience) many of the OO proponents do not understand the difference between values and variables or between operators and mutators. Received on Tue Jul 10 2001 - 03:14:47 CEST

Original text of this message