Path: utzoo!attcan!uunet!mcsun!ukc!strath-cs!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.databases Subject: Re: Outerjoin implementation? Message-ID: Date: 24 Sep 90 14:29:20 GMT References: <5803@plains.NoDak.edu> Sender: pcg@aber-cs.UUCP Distribution: comp Organization: Coleg Prifysgol Cymru Lines: 49 Nntp-Posting-Host: odin In-reply-to: cimshop!davidm@uunet.UU.NET's message of 19 Sep 90 17:09:15 GMT On 19 Sep 90 17:09:15 GMT, cimshop!davidm@uunet.UU.NET (David S. Masterson) said: davidm> In article davidm> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: pcg> It may be preferable to avoid the difficult issues posed by null pcg> values, and the definition of an outer join operation, by attaching pcg> instead to each relation (or to the underlying domains) a default pcg> value chosen by the schema designer, and/or to make an outerjoin pcg> just a join where a suitable matching default value is pcg> automatically supplied. davidm> This method *may* obviate the need for null records that occur davidm> in outer joins, but it doesn't obviate the need for NULLs as davidm> attribute values. davidm> Using default values, though, has always had the problem of davidm> finding a default value that will *never* be used as a live davidm> value. Only if you use in-band default values (I mean, default values that are not specifically tagged as being default). Even using in-band default values is not too bad, because in virtually all the applications where they would be used, in practice you need to define an in-band value as default, otherwise you get the equivalent of "dangling pointers", i.e. referential integrity is violated. One of the reasons for which NULLs are a bogosity is that they are in essence unspecified value and type defaults -- this creates a lot of special casing, because it violates domaining. They thus introduce a flavour of pointerdom into a flat model, a model that only manipulates values, not their absence. NULLs introduce all the problems of references found in some OO languages, while the relational model has not been designed for references. davidm> In fact, this is the method documented by Ingres for doing outer davidm> joins in Quel. There are those who like Quel, and those who like trouble and use SQL :-). -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk