Re: FOL/HOL: is there a middle ground?
Date: Tue, 20 Jul 2004 04:16:34 GMT
Message-ID: <C01Lc.24476$lz2.13124_at_nwrddc03.gnilink.net>
"Marshall Spight" <mspight_at_dnai.com> wrote in message
news:vE%Kc.136839$Oq2.3490_at_attbi_s52...
> "Ralph Becket" <rafe_at_cs.mu.oz.au> wrote in message
news:3638acfd.0407191600.411bb49f_at_posting.google.com...
> > "Marshall Spight" <mspight_at_dnai.com> wrote in message
news:<ZqIKc.113980$MB3.14356_at_attbi_s04>...
> > >
> > > Actually, all I want is relation-valued attributes and list-valued
> > > attributes.
> >
> > I can understand why you'd want list-valued attributes. Speaking as
> > a logic programmer, it's not clear to me why modern DBMS don't come
> > with strong, expressive, statically checked type systems for attributes.
>
> Yeah.
>
>
> > For instance, being able to define a `maybe' type would solve all those
> > problems with NULLs right off the bat.
>
> Yeah!!!
>
>
> > But I still don't understand *why* you'd want relation-valued attributes
> > if you're going to restrict yourself to finite relations. Surely you
> > could get most of that functionality using names. For example:
> >
> > binop A B AopB
> > --------------------
> > "or" F F F
> > "or" F T T
> > "or" T F T
> > "or" T T T
> > "and" F F F
> > "and" F T F
> > "and" T F F
> > "and" T T T
> > "xor" F F F
> > "xor" F T T
> > "xor" T F T
> > "xor" T T F
>
> I completely didn't understand this example. What's supposed
> to mean what here? Where's the RVA-equivalent?
RVA version:
BINARY_OPS(binary_op #binary_operation_name#, truth_table
#binary_truth_table#)
binary_op truth_table ---------------------------------------- "or" nested truth table of "or" operation "and" nested truth table of "and" operation "xor" nested truth table of "xor" operation......
You could just remove the binary_op attribute from the nested table version..
This relation variable could have a relation value that at a maximum holds 16 tuples corresponding to the domain of truth_table, if one assumes that either the binop or truth table attribute, or both, are the candidate key.
The predicate might be something like this if we removed 'binary_op': 'There exists the truth table domain #binary_truth_table#.
We can do the following with relational calculus using Ralph's example:
Get the binary operations that have the same operands and result in AopB as the "or" operation when both A and B are false.
RANGEVAR binopx RANGES OVER BINARY_OPS;
RANGEVAR binopy RANGES OVER BINARY_OPS;
(binopx.binop)
WHERE EXISTS binopy (binopy.A = binopx.A
AND binopy.B = binopx.B
AND binopy.AopB = binopx.AopB
AND binopy.binop <> binopx.binop)
AND binopx.A = F
AND binopx.B = F
AND binopx.bin_op = "or" ;
We can't make an equivalent inquiry on the nested set representation, given
the constraints and system of relational calculus (based on FOL).
>
>
> Marshall
>
>
Regards,
- Dan
