Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: database design method

Re: database design method

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Fri, 15 Nov 2002 23:57:07 +0200
Message-ID: <3DD56DB3.21E45383@atbusiness.com>


Jan,

> So can I abuse you a little more as my tutorial-D tutor? :-) Can I have
> recursive types? For example (probably not the right syntax, but I think you
> will understand what I mean):
>
> TYPE Tree = TUPLE { NODE-VALUE STRING, SUBTREES RELATION { TREE Tree } }

just returning to this question. I did not find anything related to recursive definitions
in TTM (www.thethirdmanifesto.com). However, here is an example of a recursive operator expressed
in Tutorial-D (page 163, 2ed):

OPERATOR TRANCLO ( XY RELATION { X P#, Y P# } )

                                             RETURNS RELATION { X P#, Y P# } ;
    RETURN
         WITH ( XY UNION ( ( XY COMPOSE
                                             ( XY RENAME ( Y AS Z, X AS Y ) ) )
                     RENAME Z AS Y ) ) AS TTT :
          IF TTT = XY THEN TTT     /* unwind recursion */
               ELSE TRANCLO ( TTT )    /* recursive invocation */
         END IF;

 END OPERATOR; Your Tutorial-D Tutor,
Lauri Pietarinen Received on Fri Nov 15 2002 - 15:57:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US