Re: Universal Quantifier
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 27 Jan 2007 14:47:39 GMT
Message-ID: <fCJuh.5793$1x.100425_at_ursa-nb00s0.nbnet.nb.ca>
>
> Thanks. Is that equivalent to:
>
> forall A1(p1,q1) in A(p,q). forall A2(p2,q2) in A(p,q).
> not (p1 = p2) or (q1 = q2);
>
> or does the "if ... then ..." stand for something else?
Date: Sat, 27 Jan 2007 14:47:39 GMT
Message-ID: <fCJuh.5793$1x.100425_at_ursa-nb00s0.nbnet.nb.ca>
paul c wrote:
>> paul c wrote: >> >>> Marshall wrote: >>> >>>> On Jan 22, 11:02 am, "paul" <dm_ul..._at_yahoo.com> wrote: >>>> >>>>> Does someone know where I can learn more about Universal Quantifier >>>>> (Predicate logica) in relation with Database design. >>>> >>>> Why not start here: >>>> >>>> http://en.wikipedia.org/wiki/Universal_quantification >>>> >>>> Always fun to spend an evening chasing Wikipedia links. At least >>>> until you end up at an article about a metal band. >>>> >>>> Consider that database constraints can be expressed as quantified >>>> logical formula. If table A has primary key p and table B has attribute >>>> q which is a foreign key referencing A(p), we could express that as: >>>> >>>> forall B(q). exists A(p). p=q; >>>> ... >>> >>> What formula would express a primary key? >> >> Faking it heavily, I suggest something along the lines of: >> >> forall A1(p1,q1) in A(p,q). forall A2(p2,q2) in A(p,q). >> if p1 = p2 then q1 = q2; >> ...
>
> Thanks. Is that equivalent to:
>
> forall A1(p1,q1) in A(p,q). forall A2(p2,q2) in A(p,q).
> not (p1 = p2) or (q1 = q2);
>
> or does the "if ... then ..." stand for something else?
Yes, it is equivalent. Thank you. Received on Sat Jan 27 2007 - 15:47:39 CET