Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!cuc1!lcain From: lcain@cuc1.UUCP (Leroy Cain) Newsgroups: comp.databases Subject: Re: Sybase bug? Summary: More of the same Message-ID: <2100@cuc1.UUCP> Date: 11 Jul 89 17:38:49 GMT References: <2099@cucstud.UUCP> <5003@sybase.sybase.com> Organization: Columbia Union College; Takoma Park, MD 20912 Lines: 49 In article <5003@sybase.sybase.com>, jeffl@sybase.Sybase.COM (Jeff Lichtman) writes: > I hate being wrong.... > > My previous analysis of the problem was incorrect. The query: > > select * from hello where a = 1 or a in > (select b from world) [ a clarification of SQL 86 delete] Here another way of viewing the problem. first the query in SQL. 1. select * from hello where a = 1 or a in (select b from world) Then we converted it into logical equivalent form. ( Relation Calculus ) 2. FORALL (hello) ( hello.a = 1 OR EXIST(world) (hello.a = world.b) ) We now convert the relational calculus into relation algebra. 3. (hello WHERE a=1) UNION ( hello X world WHERE hello.a=world.b )[hello.a] As you can see we move from an OR to a UNION. My quote below was not completely relavent to the discussion since R in the case we are examining are two different things. Though the general principal seems to still apply. > > "2. R WHERE c1 OR c2 > > is defined to be equivalent to > > ( R WHERE c1 ) UNION ( R WHERE c2 )" > > I can't find this in my edition of Date, but I have an old 3rd edition. > I don't think it is correct. At least, it doesn't match the ANSI > standard. What edition of Date do you have, and what section are > you quoting? I am sorry it is the 4rd edition section 13.4. > --- > Jeff Lichtman at Sybase > {mtxinu,pacbell}!sybase!jeffl -or- jeffl@sybase.com > "Saints should always be judged guilty until they are proved innocent..." Leroy Cain; Columbia Union College; Mathematical Sciences Department 7600 Flower Ave. WH406; Takoma Park, Md 20912 (301) 891-4172 uunet!cucstud!lcain