What is View?
A virtual table defined by a SQL query that provides a simplified or restricted view of data from one or more tables.
Views act as saved queries that can be referenced like tables. They simplify complex queries, restrict data access (showing only certain columns), and provide a stable interface even when underlying tables change.
Regular views execute the query each time they are accessed. Materialized views (PostgreSQL) store the result physically and must be refreshed, offering faster reads for complex aggregations at the cost of data freshness.