A database view is a named database query that can be used much like a database relation. An ordinary view stores the query definition rather than a separate persistent copy of its result. Referring to the view evaluates that definition as part of the surrounding database query; changes in the underlying data can therefore change the view's result.[ref]
Views in the PostgreSQL documentation. Tutorial 3.2 and CREATE VIEW, Description: naming a query and nonmaterialized semantics
For example, an orders table might contain identifiers, totals and payment flags. The definition
CREATE VIEW unpaid_orders AS SELECT id, total FROM orders WHERE paid = false; exposes the unpaid orders without requiring every application query to repeat the condition. If order 17 is marked paid, the next query of the ordinary view no longer includes that order, subject to the query's database transaction snapshot. Creating the view did not create another independent copy of order 17.A view can hide storage and schema details behind a stable interface, supporting data independence. A materialized view instead stores results that require a refresh policy. Some ordinary views permit updates, but a view containing aggregation or certain joins may not identify a unique underlying row to change. Update behavior and access control are separate specifications; the word view alone does not guarantee that an arbitrary definition is writable or supplies a security boundary.[ref]
Views in the PostgreSQL documentation. Tutorial 3.2, consistent interfaces; CREATE VIEW, Automatically Updatable Views and security-related parameters
New to topics? Read the docs here!