Subject: Complex Types / Nested Relations

From: <[email-masked]>
Date: Mon, 10 Aug 1992 15:06:07 -0500

Greetings,

I have a question regarding complex types and nested relations.

Version 4.0 does not support objects with attributes of a complex type
(nested relations).  For example, you couldn't create a singlely-linked
list as follows

create node (FwdLink = node) 
----------------------------------
One workaround is to write a function (called FwdLink) that returns the
forward link of a given node. An example of FwdLink (that required storing
additional information in a node) is as follows:

create node (OwnUniqueLabel = char16, BkwdLabel = char16)

define function FwdLink
  (language = "postquel", returntype = node)
  arg is (node)
  as "retrieve (node.all) where node.BkwdLabel = $1.OwnUniqueLabel"
-----------------------------------

** Question: 

Is there a preferred method for working around Version 4.0 support for
nested relations?  Is it necessary to write a specific function (such as
FwdLink) for each nested relation or has a more general scheme been worked
out that applies to all nested relations?

 ____________________________________________________________________________
|                           |                            ________            |
|     Randy S Johnston      | Alliant Techsystems, Inc. |        |           |
| Senior Research Scientist | Research and Technology   |        |           |
|   [email-masked]    | Mail Stop MN11-1610       | ALLIANT|TECHSYSTEMS|
|   Voice: (612) 931-6084   | 600 2nd St., NE           |        |           |
|    Fax: (612) 931-6165    | Hopkins, MN 55343         |________|           |
|___________________________|________________________________________________|