🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Databases Intermediate

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.

Related Terms

CTE (Common Table Expression)
A temporary named result set defined within a SQL statement using the WITH clause, improving query readability and enabling recursion.
Crosstab Query
A query that transforms rows into columns, creating a pivot table view of aggregated data.
MVCC (Multi-Version Concurrency Control)
A technique where the database maintains multiple versions of data to allow concurrent reads and writes without locking.
Redis
An open-source, in-memory data store used as a database, cache, message broker, and queue with sub-millisecond response times.
Write-Ahead Log (WAL)
A technique where changes are first written to a log before being applied to the database, ensuring crash recovery and data integrity.
Vacuum
A PostgreSQL maintenance operation that reclaims storage from dead tuples and updates statistics for the query planner.
View All Databases Terms →