Views
It is not good to see all users the logical model of database with respect to security. Also, it is good to personalize a collection of relations. So , it is possible to compute and store results of queries and then make the stored relations available to users using "Views."create view v as
Eg: create view faculty as select ID, name, dept_name from instructor;
Materialized Views
Certain database systems allow view relations to be stored, but they make sure that if the actual relations in the view definition changes, view is kept up-to-date. For eg, if a tuple is added or deleted from the table in the database, materialized views contents must be updated.This process is called materialized-view maintenance.A materialized view in Oracle is a database object that contains the results of a query. It stores data physically and get updated periodically. While querying Materialized View, it gives data directly from Materialized View and not from table.
No comments:
Post a Comment