tag:blogger.com,1999:blog-6411920579549337139.post8212329090212208164..comments2023-12-31T05:26:17.608-08:00Comments on DATABASE DEBUNKINGS: Re-writeFabian Pascalhttp://www.blogger.com/profile/01346669716885494092noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6411920579549337139.post-48258432537724186352017-06-13T19:11:59.636-07:002017-06-13T19:11:59.636-07:00It would be more helpful if your expositions more ...It would be more helpful if your expositions more clearly and explicitly distinguished between different notions of "meaning"/"semantics"--that for base (and query) predicates; that for constraints; and that for relation propositions--and between them and the business rules. Eg *some* business rules are database constraints. Eg some aren't--like that each supplier has a unique identifying supplier#, or that SUPPLIERS has predicate S(...). Eg constraints describe in terms of the base predicates what database states can arise given the business rules (including those that say what the base predicates are).philiphttps://www.blogger.com/profile/12195019450493060901noreply@blogger.comtag:blogger.com,1999:blog-6411920579549337139.post-9689264246589116692017-06-13T18:58:23.312-07:002017-06-13T18:58:23.312-07:00> tertiary (3-place) FOPL predicate: S( S#,P#,Q...> tertiary (3-place) FOPL predicate: S( S#,P#,QTY )<br /><br />> S( < S#,P#,QTY1 > ) AND ...<br /><br />The second line uses S as a monadic (1-place) predicate on tuples. It should be S( S#,P#,QTY ). (You could *define* monadic S to mean the ternary S. You could use only monadic S. But you seem to be undecided between tuple-calculus and domain-calculus styles of FOPL.)<br /><br />> (< S#,P#,QTY1 > | SUPPLIES)<br /><br />You mean S( S#,P#,QTY1 ) or (< S#,P#,QTY1 > IN SUPPLIES).<br /><br />> "the predicate can be added as a conjunct to the S() predicate"<br /><br />What you mean here, as shown by the expressions you give, is that a first predicate is <em>combined with</em> or <em>expressed in terms of</em> the S predicate. Not "conjoined". (When the first predicates are constraints, they are just true statements, so <em>conjoining with</em> S gives another predicate expression that means exactly what S means.)<br /><br />> FORALL ( < S#,P#,QTY1 > ), ( < S#,P#,QTY2 > ) [ ... ]<br /><br />This uses a shorthand that quantifies over expressions other than symbols, OK. But there's no need to do that, because you could just write FORALL S#,P#,QTY1,QTY2 [ ... ].<br /><br />Your OR NOT can be written via IMPLIES:<br /> FORALL ... [<br /> S( S#,P#,QTY1 ) AND S ( S#,P#,QTY2 ) IMPLIES (...)<br /> ]<br />or<br /> FORALL ... [<br /> < S#,P#,QTY1 > IN SUPPLIES<br /> AND < S#,P#,QTY2 > IN SUPPLIES<br /> IMPLIES (...)<br /> ]<br />which is closer to one intuitive phrasing, "if two tuples < S#,P#,QTY1 > AND < S#,P#,QTY2 > are in SUPPLIES then ... . Notice that tuples-IN-SUPPLIES is expressed by forming a tuple from the attributes in the expression part of the FORALL (in your version and mine). Not in the list preceding it.philiphttps://www.blogger.com/profile/12195019450493060901noreply@blogger.com