Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A view is a stored SELECT statement that returns a table whose data is derived from one or more other tables (called underlying tables). Some important characteristics of a view are:
A view’s underlying tables can be base tables, temporary tables, or other views.
A view is called a virtual or derived table to distinguish it from a base or temporary table.
The DBMS stores a view as only a SELECT statement, not as a set of data values, thus preventing data redundancy.
A view materializes dynamically as a physical table when referenced by name in an SQL statement. It exists only for the duration of the statement and vanishes when the statement ends.
A view consists of a set of named columns and rows of data, so you can use it almost anywhere you’d use a real table.
You have no restrictions on querying (SELECTing) through views. In some cases, views can be updated, causing the data changes to be passed through to the underlying base tables.
Because of closure, a view always is a single table no matter how many underlying tables it references or how those tables are combined; see the Tips in “Tables, Columns, and Rows” in Chapter 2.