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.