🎁 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

EXPLAIN ANALYZE
A PostgreSQL command that shows the execution plan of a query along with actual runtime statistics for performance tuning.
Query Optimization
The process of improving database query performance through indexing, query rewriting, and schema design techniques.
Full-Text Search
A technique for searching natural language text in databases using word stemming, ranking, and relevance scoring.
B-Tree Index
The default index type in most databases that organizes data in a balanced tree structure for efficient searching, sorting, and range queries.
Foreign Key
A column that creates a link between two tables by referencing the primary key of another table.
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 →