Views In MySql
In this tutorial we will learn what is view in mysql, what is the advantage of view, how to create view in mysql, how to update a view in mysql ,create view with check option and finally how to drop a view from mysql .
What is view in mysql
Views is an important task for a mysql database administrator. View is a logical table .We can perform insert ,update and delete operation using view. But when we execute one query on view ,the request goes to the physical table and requested operation will be perform there. Then the acknowledgement sent back to view to see the data of the table. Therefore performance will be degraded by using view in mysql.
What is the advantage of view in MySql
There are some advantages of view. These are following.
1) A complex query will become simple query using the view: When create a complex operation like join we can use view statement to do the query simple.
2) View provides extra layer of security of database: Suppose we have a table of department which contains many department name .We want to restrict one department data from other department we can do this using View. For this reason it provides extra layer of security.
3) We can restrict data for user: Suppose we have a table of department which contains many department name .We want to restrict one department data from other department we can do this using View.
In this tutorial we have learned what is view in mysql, what is the advantage of view, how to create view in mysql, how to update a view in mysql ,create view with check option and finally how to drop a view from mysql .
For more details visit : techrideradmin.blogspot.com
0 Comments