# Re: Yet another relational programming language

From: Tegiri Nenashi <tegirinenashi_at_gmail.com>

Date: Thu, 10 Sep 2009 16:30:43 -0700 (PDT)

Message-ID: <3bf446e4-12fa-455d-ae12-67ab7f93ef49_at_d9g2000prh.googlegroups.com>

On Sep 10, 3:53 pm, paul c <toledobythe..._at_oohay.ac> wrote:

Date: Thu, 10 Sep 2009 16:30:43 -0700 (PDT)

Message-ID: <3bf446e4-12fa-455d-ae12-67ab7f93ef49_at_d9g2000prh.googlegroups.com>

On Sep 10, 3:53 pm, paul c <toledobythe..._at_oohay.ac> wrote:

*> Vadim Tropashko wrote:**> >http://vadimtropashko.wordpress.com/relational-programming-with-qbql/**>**> Vadim, just curious about a perhaps not very common case:**>**> supposing attributes c and s are constrained to the values {1,2} and**> these predicates:**>**> "c is a customer":**> C**> c**> 1**> and**> "s is a supplier"**> S**> s**> 2**>**> In an unconstrained version of D&D algebra,**>**> "c is a custome OR s is a supplier":**> C <OR> S:**> c s**> 1 1**> 1 2**> 2 2**> In rellattice I presume the result of C v S would be something like**> "table_dee", is that right?*
Yes.

----QBQL input:

C = [c] 1;

S = [s] 2;

C v S;

----QBQL output:

CvS=R01;

*> If so, can one use negation in rellatice to get the same result or is*

*> there another way?*

Yes to both. The '+' operation is exactly the same as D&D <OR>. Here are some identities it enjoys:

x + y = (x' ^ y')'.

x + y = (x ^ (y v R11)) v (y ^ (x v R11)).
x ^ (y + z) = (x ^ y) + (x ^ z).
Received on Thu Sep 10 2009 - 18:30:43 CDT