Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site unc.unc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!whuxcc!lcuxlm!akgua!mcnc!unc!rts From: rts@unc.UUCP (Rick Snodgrass) Newsgroups: net.database Subject: Re: Problem with relational theory Message-ID: <316@unc.unc.UUCP> Date: Mon, 8-Sep-86 09:53:33 EDT Article-I.D.: unc.316 Posted: Mon Sep 8 09:53:33 1986 Date-Received: Thu, 11-Sep-86 08:26:27 EDT References: <595@ur-tut.UUCP> <452@hdsvx1.UUCP> <819@navajo.STANFORD.EDU> Reply-To: rts@unc.UUCP (Rick Snodgrass) Organization: CS Dept, U. of N. Carolina, Chapel Hill Lines: 29 In article <819@navajo.STANFORD.EDU> avg@navajo.UUCP (Allen Van Gelder) writes: >I disagree with Hoffman's attempted justification of the way >Eric Carleen's query is handled. Having a calculus-based language >loses its point if the user has to know how the system is going >to translate it to relational algebra, possibly incorrectly. > >His query, essentially: > retrieve t1 where t1.name = t2.name or t1.name = t3.name >has an obvious meaning in relational calculus, and he has a right >to expect the answer to be based on this meaning. > >The correct way to translate an "or" in a selection is as a union. >This is shown in "Principles of DB Systems," by J.D. Ullman in >proving that relational algebra has the same power as relational >calculus. One must be careful in deciding what the meaning of a statement in any language is. The best way is to go back to the formal semantics of the language. In his book, Ullman gives the semantics for Quel (Section 6.4). For this query, it is {u | (Exists t1)(Exists t2)(Exists t3) (R(t1) and R(t2) and R(t3) and u = t1 and (t1[name] = t2[name] or t1[name] = t3[name]) ) } This semantics, which supports Hoffman's reply, is independent of the relational algebra. Rick Snodgrass Department of Computer Science, University of North Carolina at Chapel Hill