Views - part 2

Sometimes interviewer may ask you following questions.

Is it possible to create a view on existed view?


    Yes, generally we can create views on tables  and it is also possible to create view on other views.

 Is it possible to update views?


   Yes, But while updating multiple tables it is not possible to update base tables correctly. To overcome this INSTEAD OF TRIGGER concept is there.


Click here for the triggers

What is indexed view?


Generally while performing select operation on views then the data will be retrieved from it's base tables not from the view.

When we create a index on view the data stored in a sorted order. Now if you perform select query the data comes from index only instead of  going to base tables that means the performance of the select query will be improved.

Note: 
  •  In oracle indexed views are materialized views
  • It is not possible to pass parameters to view.
  •  On temporary tables we can not create views.

 

No comments:

Post a Comment

What is Normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...