[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] Validate **against** a schema OR validate **with** a schema?
- From: "Michael Kay" <mike@saxonica.com>
- To: "'Ken Starks'" <ken@lampsacos.demon.co.uk>
- Date: Fri, 23 Jan 2009 11:12:54 -0000
> > Another point which SQL got right is
> > that you can use the same language to define queries as to define
> > views, so once you have a working query you can treat its
> result as a
> > view. This of course demands closure...
>
> Correct me if I'm wrong, but isn't there still a bit of
> confusion about whether a query and a view are always the same thing.
>
> Many ( ? most ) databases will allow a view to have an
> ORDER BY statement, and will preserve the ordering, wheras
> SQL tables are not supposed to have any particular order. I'm
> a bit nervous about relying on this, but it seems to work,
> and it is often convenient.
Yes, SQL doesn't implement the pure relational model, and allowing tables to
be ordered is one example of that, and allowing ordering in a view but not
in base table does indeed violate closure.
>
> In a current project, I am getting XML from a 'ordered' view,
> and I could in principal do some sorting in three places:
> when defining the view, when querying the view, or when
> passing the XML through XSLT. Which is better ?
I'm a pragmatist. Push the processing to the database if it can cope with
it, pull it back to the application if it can't. Do what works. Do what best
meets your project objectives, e.g. performance vs potential for change.
Michael Kay
http://www.saxonica.com/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]