Different SQL Views relate differently to the Database
As you start working with views, it is important to also introduce the fact that different views will relate differently to the database when updating information.
The different modes supported by views, read-only and updateable, are really only a concern if
you are creating a view to insert information into, or updating information from your database tables.
For most reporting, the updateable status of a given view is less important.
This is because with the reporting queries, you are generally OK with the read-only view, since all you want to do is review the
results, not update the underlying tables.
A view is a SQL statement that is stored in the database with an associated name.
A view is actually a composition of a table in the form of a predefined SQL query.
A view can contain all rows of a table or select rows from a table. A view can be created from one or many tables which depends on the written SQL query to create a view.
Views, which are kind of virtual tables, allow users to do the following:
- Structure data in a way that users or classes of users find natural or intuitive.
- Restrict access to the data such that a user can see and modify exactly what they need and nothing else.
- Summarize data from various tables which can be used to generate reports.