Databases & Data Storage

Schema

Definition

A database schema is the "blueprint" of a database that describes how the data is organized, how the relations among them are associated, and the constraints that apply to the data.

Why It Matters

The schema is the foundation of a database design. A well-designed schema ensures data integrity, consistency, and efficiency. A poorly designed schema can lead to performance problems and data anomalies.

Contextual Example

The schema for a `Users` table would define its columns (`UserID`, `Username`, `Email`), their data types (INTEGER, VARCHAR, etc.), and which column is the primary key.

Common Misunderstandings

  • In relational databases, the schema is fixed and must be defined before data is inserted ("schema-on-write").
  • In many NoSQL databases, the schema is flexible and applied when the data is read ("schema-on-read").

Related Terms

Last Updated: December 17, 2025