Path: utzoo!attcan!uunet!van-bc!tfic.bc.ca!clh From: clh@tfic.bc.ca (Chris Hermansen) Newsgroups: comp.databases Subject: Re: Outerjoin implementation? Message-ID: <1990Sep20.161204.13014@tfic.bc.ca> Date: 20 Sep 90 16:12:04 GMT References: <5803@plains.NoDak.edu> Reply-To: clh@tacitus.UUCP (Chris Hermansen) Distribution: comp Organization: Timberline Forest Inventory Consultants Lines: 51 In article cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: >In article pcg@cs.aber.ac.uk >(Piercarlo Grandi) writes: > > It may be preferable to avoid the difficult issues posed by null values, Yay! Someone else who hates nulls!! > and the definition of an outer join operation, by attaching instead to > each relation (or to the underlying domains) a default value chosen by > the schema designer, and/or to make an outerjoin just a join where a > suitable matching default value is automatically supplied. > >This method *may* obviate the need for null records that occur in outer joins, >but it doesn't obviate the need for NULLs as attribute values. In fact, this >is the method documented by Ingres for doing outer joins in Quel. Using >default values, though, has always had the problem of finding a default value >that will *never* be used as a live value. NULLs almost guarantee strange `gotchas', don't you think? For instance, instead of writing a statement like update foo set bar = 37 where qqsv != 0 the SQLer has to decide if update foo set bar = 37 where qqsv != 0 or qqsv is null is what s/he REALLY means. Put another way, update foo set bar = 37 where qqsv != 0 and qqsv isnt null provides no extra degree of refinement over the first update statement, even though it appears to (for the casual observer, at least). It's also really handy that select qqsv,count(*) from foo group by qqsv produces a separate line for every row in foo that has a null in qqsv, don't you think? Note that I use Informix SQL, so your lack of mileage may vary on the above Chris Hermansen Timberline Forest Inventory Consultants Voice: 1 604 733 0731 302 - 958 West 8th Avenue FAX: 1 604 733 0634 Vancouver B.C. CANADA clh@tfic.bc.ca V5Z 1E5 C'est ma facon de parler.