Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.databases Subject: Re: SQL query Message-ID: Date: 19 Mar 90 05:08:34 GMT References: <9349@stiatl.UUCP> Sender: davidm@cimshop.UUCP Distribution: usa Organization: Consilium Inc., Mountain View, California. Lines: 33 In-reply-to: hughes@tsunami.Berkeley.EDU's message of 17 Mar 90 04:01:43 GMT In article hughes@tsunami.Berkeley.EDU (Eric Hughes) writes: In article <9349@stiatl.UUCP> rk@stiatl.UUCP (Rajeev Kumar) writes: >"Retrieve all the SubGrps of @US". >By "all SubGrps" I mean if @US has a SubGrp which >also happens to be a SuperGrp, then retrieve the >SubGrps of that SubGrp and so on. This query is a form of a "transitive closure." In graph language, it means that you take a node, and come up with the set of all nodes which can be reached from the original. This can't be done in SQL. Date has a paper on this in his book _Selected Writings_. BTW, he thinks it is a deficiency. This seems to be a fairly common problem in many different areas. One common area where this problem shows up is in the manufacturing of anything of composed of subparts which in turn are composed of other subparts. It is often important to be able to follow such a subpart graph through an unknown number of levels in order to determine a relationship (as in "What end-products are dependent on part X?" or "What parts go into the construction of product Y?"). Since its been brought up, I'd like to ask, given the deficiency in SQL, how are database vendors attempting to answer these problems? -- =================================================================== David Masterson Consilium, Inc. uunet!cimshop!davidm Mt. View, CA 94043 =================================================================== "If someone thinks they know what I said, then I didn't say it!"