| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: database design method
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;
![]() |
![]() |