Re: Select enumeration of intergers

From: Alvin Ryder <alvin321_at_telstra.com>
Date: 10 Jul 2006 14:30:06 -0700
Message-ID: <1152567006.270311.304510_at_b28g2000cwb.googlegroups.com>


Marshall wrote:
> Alvin Ryder wrote:
> > frebe73_at_gmail.com wrote:
> > > I need to make a select statements according to this:
> > >
> > > select value
> > > from all_integers
> > > where value => 510 and value < 515
> >
> > Hmm, but all those approaches are hacks. Relational operators are only
> > meant to work with relations. Your request is about manipulation of a
> > particular type, hence it's in the domain of stored procedures (type
> > operators).
>
> Fredrik's proposed all_integers is a unary relation with a single
> attribute
> named "value" of type int, whose elements are every possible int
> value. Nothing wrong from a logical standpoint of doing relational
> operations on those. There might be some implementation challenges,
> though.
>
>
> Marshall

I saw integers as a domain or type, its hard to argue against that but I also suppose you could form relations over a "set of numbers", frankly I had never spotted that possibility before, so I guess both cases are theoretically true. Although /maybe/ you could argue the relation version isn't the simplest and it also forms an unnecessary "access path" to value thereby infringing on independence - and these go against key principles of the RM ... But I need coffee instead. Received on Mon Jul 10 2006 - 23:30:06 CEST

Original text of this message