🎁 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

Cursor
A database object that enables row-by-row processing of query results, useful for operations that cannot be done in bulk.
Database Connection Pooling
A technique that maintains a cache of database connections for reuse, reducing the overhead of creating new connections.
Index
A data structure that improves the speed of data retrieval operations on database tables at the cost of additional storage.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
Crosstab Query
A query that transforms rows into columns, creating a pivot table view of aggregated data.
EXPLAIN Plan
A database command that shows how the query planner will execute a SQL query, revealing join methods, scan types, and estimated costs.
View All Databases Terms →