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

Categories

Databases Beginner

What is Schema?

The structure definition of a database including tables, columns, data types, relationships, indexes, and constraints.

A database schema defines what data can be stored and how it is organized. It includes table definitions (CREATE TABLE), column types (VARCHAR, INTEGER, TIMESTAMP), constraints (NOT NULL, UNIQUE, CHECK), relationships (FOREIGN KEY), and indexes.

In PostgreSQL, schemas also refer to namespaces within a database (public schema is the default). Schema design decisions significantly impact application performance, data integrity, and development speed. Good schema design follows normalization principles while balancing query performance needs.

Related Terms

Row-Level Security (RLS)
A database feature that restricts which rows a user can access in a table based on security policies.
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.
Replication
The process of copying and maintaining database data across multiple servers for redundancy, failover, and read scaling.
EXPLAIN Plan
A database command that shows how the query planner will execute a SQL query, revealing join methods, scan types, and estimated costs.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
MVCC (Multi-Version Concurrency Control)
A technique where the database maintains multiple versions of data to allow concurrent reads and writes without locking.
View All Databases Terms →