Hi Andrew, (nice analysis :)
> [editable views] Yes, having them would require the same basic implementation as a "queries as views" feature as originally proposed, so this doesn't make a difference here. (Except that when we do not implement "Queries in Queries" by "Queries in Views", then this means we probably won't invest the effort for the editable views :) > What of any side effects however. Two problems, risks, with the 'query > as view' approach come to mind. The first is related to the HSQL engine > itself. I believe that when a view is created there are optimizations > and constraints added to the schema. In the case of constraints this > means that when a user attempts to alter a table structure ( alter table > command ) in such as way that would affect the validity of the view the > engine will recognize this and disallow the execution of the command. In > such a case one must drop the view first, alter the table, then > re-create the view. This is I believe considered one benefit of using a > view versus a select statement. Yes, in fact currently HSQLDB enforces the integrity, so it is as you describe (well, except issue 64885 :( ). Ideally, it would be best to recognize the invalidity of a view at the very moment it is actually *used*, but so far I couldn't convince the HSQLDB project that this would be best from an OOo user's point of view ;) > The second problem I forsee is support for parameterized queries. I will > simply ask how that would be done using a view? Well, this shouldn't be a problem. HSQLDB allows storing parametrized views, but currently OOo doesn't respect this in that it doesn't know about the parameters (and thus doesn't give the user a chance to fill them in). The latter could easily be changed: As soon as OOo is able to retrieve the underlying SQL statement of a view (as you outlined, this is necessary anyway), it can also analyze it and know about the parameters. Would be pretty straight forward. In general, I think the whole issue depends on the requirements. My (implicit) assumption so far was that queries in queries are desired for single-file databases only. Seems that this wouldn't become consensus here :). Given that, and given that in fact HSQLDB currently has some itches with its views - well, not really itches, but reasonable behaviour which is undesired in OOo context -, the approach you formerly sketched - let OOo replace <query> in SELECT * FROM <query> with the actual statement - might fit more purposes. (Though I still don't like the fact that the whole "Queries in Queries" feature depends on the parsebility then :-\) Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
