Re: Operationalize orthogonality



Pickie wrote:
Tony D wrote:

The only type absolutely required is the boolean type. You could (and I
stress, *could*) attempt to model everything from there on up in terms
of relations and booleans, but that would require a frightening degree
of circumlocution.

How would you represent a count (IE the non-negative integers) using
only booleans and relations?

You shouldn't. The point is that the relational model requires only
boolean scalars and the corresponding nullary, unary, and binary
operators. Beyond that, an RDBMS is expected to provide a mechanism
whereby other types and operators can be defined. What types? Well,
integers, rationals, characters, and strings are undoubtedly useful.
How 'bout internet addresses? Points? Complex numbers? States?
Music? Telephone numbers? Mass? Length? Raster images? Vector
drawings? You bet! It's all up to the user of the database system
The only thing the relational model demands is that, for each type,
an operator must be provided that can determine whether two values
of the same type are different.

How would you represent a text string? I
ask because these seem to me to be basic concepts (or primitive types?)
and both of them have simple ways to represent a boolean (zero and
empty string respectively being false, all else true).

It is expected that various RDBMSs would provide "off the shelf" support
for the types you consider primitive. But it could well be that a user
would want to define a numeric type that did arithmetic a bit
differently than they way you were probably taught in school. My
running example is that proposed by Iverson and made manifest in APL
and J: any value divided by itself is 1 - including "zero divided by
zero." Rationals are considered equal if they're close to each other.
How close? There's an epsilon value - commonly called fuzz - that
specifies closeness.

At a "higher" level, consider states: we all recognize that TX and Texas
and Tex. are the same value, right? (I'm not talking about the sequence
of characters -- I'm talking about what they represent.) An RDMS
should provide a mechanism whereby a user can define a STATE type which
happens to know that all these are acceptable representations of the
same value.

.



Relevant Pages

  • Re: Sumproduct in UDF
    ... Using Booleans for text strings was just a silly mistake. ... I am simply using UDF in this case to make an Excel application more user ... > Function Function_Name(Code As Integer, Job As String, Country As String) ...
    (microsoft.public.excel.programming)
  • Re: Booleans in Perl
    ... It understands false values just fine, but the string "FALSE" is not a ... I tend to use the values 1 & 0 when assigning to booleans, ... print "the expr evaluates to false\n"; ...
    (comp.lang.perl.misc)
  • Re: Operationalize orthogonality
    ... of relations and booleans, but that would require a frightening degree ... the type base such that the RDBMS only 'has' the minimum about ... empty string respectively being false, ... any value divided by itself is 1 - including "zero divided by ...
    (comp.databases.theory)
  • Re: Operationalize orthogonality
    ... of relations and booleans, but that would require a frightening degree ... the type base such that the RDBMS only 'has' the minimum about ... empty string respectively being false, ... any value divided by itself is 1 - including "zero divided by ...
    (comp.databases.theory)
  • Re: convert a byte to an array of bits
    ... As a string of ... As an array of integers? ... As an array of booleans? ...
    (microsoft.public.dotnet.languages.csharp)