Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: internal handling of views
"Charles M" <CharlesM_at_nowhere.com> wrote in message
news:tJCdneITiIafwEjZnZ2dnUVZ_tqdnZ2d_at_giganews.com...
:I was having a discussion with a fellow wherein he remarked that changing a
: value in one of a view's originating table(s) causes the views defining
sql
: to fire in order to populate the view.
always ask for references and test cases. these statements are not true.
: I was always under the impression that
: a view element was a pointer (as in the C programming language) back to
the
: same memory storage as in the underlying table*, i.e no sql, triggers, etc
are
: fired - changing a value is really changing the memory storage, and the
table
: and view are both pointing back to that memory, so one being changed IS
: (IS as in 'exactly' not 'the same thing as') the other being changed.
conceptually, true, but as Herod has already posted, a view is nothing other than a stored SQL SELECT statement, evaluated when used. so updating the source table(s) has no affect on the view until the view is accessed in another SQL statement. at that time the data qualified by the view will be based on the committed data in the source table(s) at the time of data access -- the view's 'dataset' is not affected by subsequent changes (committed or not) to the source table(s) unless the view is re-accessed, ie., the dataset of the view is not dynamically updated as the source data changes.
technically, the table defines persistent storage on disk (which may be buffered in memory) and views are stored SQL SELECT statements
:
: So , who's right here (or neither of us)?
:
: CMM
:
:
: * Put another way: if you could shut down the database, and using some
other
: method, change the value in that memory storage location of the underlying
: table(so that the value changed, but NOT through anything or any means in
: Oracle) and then, also without having Oracle or any triggers,sql,etc
running,
: you could somehow look at the value for the view, what would you find
there?
when you shut down the database, memory is cleared assuming you mean disk, it is not supported or recommended to modify data blocks outside of the RDBMS or oracle utilities put for purpose of illustration, if data of a table is changed by any means, the next time the views is accessed, the data from the table would be retrieved at that point in time via the view definition's SELECT as if the SELECT statement was manually typed in.
views are pull, not push, paths into the data
++ mcs Received on Sun Aug 06 2006 - 06:21:06 CDT
![]() |
![]() |