Re: Thinking about MINUS

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 8 Jan 2007 12:43:28 -0800
Message-ID: <1168289008.215223.254530_at_42g2000cwt.googlegroups.com>


DBMS_Plumber wrote:
> The whole point of Peano's mad rambling is that you don't need
> 'symbols' for each number at all. A perfectly rigorous and quite
> powerful arithmetic can be derived from a single anchor, and a
> 'relational theory relation' with enough constraints.
>
> (Forgive me Codd, for I have SQLed).
>
> CREATE DISTINCT TYPE Natural_Number USING 'mumble'; -- it doesn't
> matter.
>
> CREATE TABLE Successor ( X Natural_Number NOT NULL PRIMARY KEY,
> Y Natural_Number UNIQUE
> REFERENCES Successor ( X ),
> CHECK ( X <> Y ) );
>
> The final axiom is really hard. So I'll just punt on it.
>
> Note - oddly - I can't get rid of the nullability of the Y column.

Nulls are not required. Instead, you relax the foreign key constraint to ANSI SQL style assertion:

select X from Successor
minus
select Y from Successor
minus
select 'lowest number'
= {}

which asserts that the set of all predecessor "numbers" is no bigger than the the set of all "successors" plus some distinguished "number".

OK, can you please write the PLUS view definition in your system? Received on Mon Jan 08 2007 - 21:43:28 CET

Original text of this message