Re: internal handling of views
- From: Charles M <CharlesM@xxxxxxxxxxx>
- Date: Mon, 07 Aug 2006 08:17:44 -0500
On 2006-08-06, HansF <Fuzzy.Greybeard@xxxxxxxxx> wrote:
On Sun, 06 Aug 2006 10:39:12 -0500, Charles M wrote:
Im not sure what you mean here by conceptually true. If its true then updating
the table source would indeed have an instantaneous effect on the view
(because the data element is the same).
Yes. That is, in fact, what happens.
<snip>
A view is nothing more than a STORED SELECT. It is evaluated at run time.
Since the details are stored, the optimizer may elect to merge the
definition of the view with other information, should the view be used in
a compound situation, such as a join ... it is possible that the original
view may not 'executed' in such a situation.
There is no 'data' attached to the view. It is in the table (and only in
the table).
<snip>
All of this is in the concepts manual, and can easily be proven through
simple tests.
Thanks for the reply Hans. The problem I have with the concept manual is
that it states that a view can be THOUGHT OF (emphisis mine) as a stored
query or virtual table. Well, when someone says something can be thought of,
they usually mean thats not what it truly is, or they would have use IS
instead of THOUGHT OF. So, I'm unsure if the concept manual is just talking
this tact from there on forward or if they really, really mean thats what it
is.
Also in discussing mechanics of a view the manual says that sql involving a
view is merged with the views definition (its stored sql). Well, thats all
fine and for selecting from a view, but how does it work for updating a view?
You can't do an 'update .. select from' if the from doesn't contain any data.
It would have to do (possibly complex) logic to figure out where the elements
go, not merely merging a select query. On the other hand, the pointer
description works just fine for this, and as best I can tell gives all the
other characteristics of a view as well. But I've only run across the pointer
definition once (read somewhere or told by a DBA - don't recall) and every
book I've seen since mentions the stored query definition. So I'm faced with
an answer that makes more sense but from a source that may be suspect, or the
more prevalent definition.
Anyway, thanks again for the reply.
CMM
.
- Follow-Ups:
- Re: internal handling of views
- From: HansF
- Re: internal handling of views
- From: Mark C. Stock
- Re: internal handling of views
- References:
- internal handling of views
- From: Charles M
- Re: internal handling of views
- From: Mark C. Stock
- Re: internal handling of views
- From: Charles M
- Re: internal handling of views
- From: HansF
- internal handling of views
- Prev by Date: Re: loadjava and Java version
- Next by Date: Re: internal handling of views
- Previous by thread: Re: internal handling of views
- Next by thread: Re: internal handling of views
- Index(es):
Relevant Pages
|