Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle views clarification

Re: Oracle views clarification

From: Oracle Help <oraclehelp_at_dbdomain.cc>
Date: Fri, 01 Oct 2004 11:49:52 GMT
Message-ID: <Avb7d.297$Vm1.150@newsread3.news.atl.earthlink.net>


Hi,

A "dynamic" view, as you call it, is an access path to the data in one or more tables. Views are sometimes called stored queries because you define a view using a query. The tables referenced in a view's defining query are called the base tables of the view. Once you create a view, you can target the view with standard DML SQL statements such as SELECT, INSERT, UPDATE, and DELETE, just as you would do with a table. However, it is important to understand that views are based on one or more tables -- a view itself does not store data; rather, a view derives its data from its base table(s). Therefore, when you target a view with a SQL statement, Oracle automatically performs the requested operation using the data in the view's base tables. For example, when you query a view, Oracle materializes the view's data at runtime by transforming the query so that it retrieves information from the underlying base table(s).

Unlike a normal view in an Oracle database, a materialized view generates a snapshot of its data and stores the data in one or more data segments. To keep a materialized view's snapshot of data in synch with its underlying base tables, you can schedule the materialized view so that Oracle automatically refreshes its data. When a query targets a materialized view, Oracle reads the pre-computed data from the view's data segment rather than expensively generating the data at runtime. A materialized view is also similar to an index as follows: after you create a materialized view, Oracle can automatically rewrite a query that targets the view's base tables so that the query uses the view and executes more efficiently.

-- 
Hope this helps!
oraclehelp_at_dbdomain.cc
The Database Domain (http://www.dbdomain.com)
Online and CD Training for Oracle DBAs
Oracle Certification Training (OCA and OCP)

"Teresa" <tpreto7_at_sapo.pt> wrote in message 
news:6dabc692.0409301805.2e1f407a_at_posting.google.com...

> Hi
>
> Can someone please explain the difference is between an Oracle dynamic
> view & materialized view.
>
> Thank you
> Teresa
Received on Fri Oct 01 2004 - 06:49:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US