A view takes the output of a query and makes it appear like a virtual table. You can use a view in most places where a table can be used. All operations performed on a view will affect data in the base table and so are subject to the integrity constraints and triggers of the base table. A View can be used to simplify SQL statements for the user or to isolate an application from any future change to the base table definition. A View can also be used to improve security by restricting access to a predetermined set of rows or columns.
An updatable view lets you insert, update, and delete rows in the view and propagate the changes to the target master table. See the Oracle Database Administrator's Guide for full details. A view is like a virtual table. It takes the output of a query and treats it like a table. A view can be based on one or more tables or other views.
A view takes up no storage space other than for the definition of the view in the data dictionary. A view contains no data. All the data it shows comes from the base tables. A view can provide an additional level of table security by restricting access to a set of rows or columns of a table. A view hides implementation complexity. The user can select from the view with a simple SQL, unaware that the view is based internally on a join between multiple tables.
In case of view its only the logical view of table no separate copy of table but in case of Materialized view we get physically separate copy of table. In case of Materialized view we need extra trigger or some automatic method so that we can keep MV refreshed , this is not required for views in database. Materialized View. View will not store any data- It's just a stored Query which will fetch data from its Base Table. M-View will store data in Table segment.
Views are virtual only and run the query definition each time they are accessed. Materialized views are disk based and are updated periodically based upon the query definition.
View is mainly used for Security purpose. M-view is used for Performance improvement. Whenever Base table is dropped the View will become inaccessible. Whenever Base table is dropped the M-View will still be accessible. We can perform DML operations directly on View. We can't perform DML operations.
Get involved and leave your Comments in the Box Below. The more people get involved, the more we all benefit. So, leave your thoughts before you leave the page. Email This BlogThis! Learncodeprograms February 7, at PM. Newer Post Older Post Home. Subscribe to: Post Comments Atom.
0コメント