Path: utzoo!attcan!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.databases Subject: Re: Outerjoin implementation? Message-ID: Date: 18 Sep 90 18:20:04 GMT References: <5803@plains.NoDak.edu> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 29 Nntp-Posting-Host: odin In-reply-to: gus@plains.NoDak.edu's message of 10 Sep 90 05:32:22 GMT On 10 Sep 90 05:32:22 GMT, gus@plains.NoDak.edu (jim gustafson) said: gus> To my knowledge, outjoins (left/right) are typically implemented using gus> either a simple loop-join or else a sort-merge join. I think Oracle gus> uses a variation on sort-merge join. Can someone provide references to gus> outerjoin implementations? Frankly I believe that these are exactly the same option as for joins. I will actually represent that outjoins are a bogosity, as are null values. It may be preferable to avoid the difficult issues posed by null values, 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. Take the classic outer join example of a parts(partno*,description*) relation and an orders(date*,partno*,quantity,customerno) relation, where we want a report showing *all*, not just those with orders outstanding, parts and the quantity on order for each, with those not on order marked as such. Generalize to taste :-). The implementation would then really look like the same for joins. -- 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