Working with database views
Views are one of the ways of putting related data from multiple tables under one container. If you have been using any mainstream RDMBS for some time, then it is possible that you have come across a view more than once. If not, a view is a simple SQL script where you specify which columns from which tables you want to appear in the view, and how those tables are related with each other. Once that script is executed, the database will create an object that holds information about the tables and columns involved in the view definition. After that, you can use the view like any other table with only one restriction; that you are only allowed to read from the view. You cannot update the data in the view (some RDBMS allows the updating of part of the data in a view, with some constraints, but let's ignore that for a moment). Reason for this is that, when you execute a SELECT
statement against a view, the database server actually runs the original script that we used...