Re: define views using xquery

Dear Chen,

Xquery *has* already a view mechanism: via functions.

A function without any parameters corresponds entirely to
a non-parametrized view SQL style, while a function with
parameters correspond to a parameterized view.

Hence, instead of using

define view FOO as
   query

please use

define function FOO() as
   expression

and you will get the exact same effect.

Best regards,
Dana



On Thu, 2002-02-21 at 01:01, Chen Ya Bing wrote:
> I'd like to use XQuery as a view definition language to define XML views. but I find that it is difficult to use it as the view definition language, because a simple view definition have to lead to a complex XQuery. even more, it may be inefficient. comparing with view definition in SQL, it is inconvenient.
> 
> can anybody give me advices of how to utilize XQuery to define XML view more efficiently?
> and how will the XQuery WD support the view facility.
> 
> Best regards,
> Chen

Received on Thursday, 21 February 2002 13:25:18 UTC