Path: utzoo!attcan!uunet!zephyr.ens.tek.com!tekgen!tekcae!moiram From: moiram@tekcae.CAX.TEK.COM (Moira Mallison) Newsgroups: comp.databases Subject: Re: SQL Poser (Ingres specific) Message-ID: <6091@tekgen.BV.TEK.COM> Date: 7 Jun 90 18:43:13 GMT References: <6588@umd5.umd.edu> Sender: news@tekgen.BV.TEK.COM Reply-To: moiram@tekcae.CAX.TEK.COM (Moira Mallison) Organization: Tektronix, Inc., Beaverton, OR. Lines: 27 In article jkrueger@dgis.dtic.dla.mil (Jon) writes: > >SQL (and other query languages for RDBMS) can't express recursive >queries. So the simple answer is it can't be done. The longer answer >is ... without writing a program in some general purpose >programming language ... About a year and a half ago, I was working on a similar problem ( closure traversal of an n-ary sub-tree from an arbitrary node in the tree). The solutions I ended up with were similar to the one Jon proposed. At that time, I was told that Version 6.X would include cursors in ESQL which could be defined as a host-language variable. This solves the problem of not knowing the length of the path one is trying to follow, as the programmer could pass a counter and construct a cursor-name using the counter to assure uniqueness. Thus, we could at least use the recursive capabilities in the host language. Did this in fact make it into Ingres Version 6.0 ESQL or was it vaporware? (We're mostly running on machines that haven't been upgraded yet, for one reason or another). Moira Mallison CAX Data Management Tektronix, Inc