View (SQL)

Unlike ordinary base tables in a relational database, a view does not form part of the physical schema: as a result set, it is a virtual table[1] computed or collated dynamically from data in the database when access to that view is requested.

Therefore, an ORDER BY clause in the view definition is meaningless; the SQL standard (SQL:2003) does not allow an ORDER BY clause in the subquery of a CREATE VIEW command, just as it is refused in a CREATE TABLE statement.

Read-only views do not support such operations because the DBMS cannot map the changes to the underlying base tables.

This technique allows the definition of other logic for execution in place of an insert, update, or delete operation on the views.

Thus database systems can implement data modifications based on read-only views.

The accuracy of a materialized view depends on the frequency of trigger mechanisms behind its updates.