schema
A formal description of the structure of data: which fields or columns exist, their types and which are required.
In more detail
A database schema defines tables, columns, keys and constraints; a message schema, such as a JSON Schema, defines the shape of data sent between programs. The schema is a contract with every program that reads or writes the data, so rules written into it apply to all of them.
Examples
In AWS: The structure of a database: its tables, columns, types, keys and relationships.Avro and Protocol Buffers are schema-full formats; JSON is schema-less and self-describing.In the browser: In IndexedDB the schema can only change inside an upgradeneeded event, triggered by opening the database with a higher version number.In a SIEM, the schema decides that a source address is always source.ip (ECS) or src_endpoint.ip (OCSF), whatever the log said.In this course: A fresh temporary schema per test group keeps database tests independent. In contract testing, the schema of a response is part of the promise between services.Related terms
- JSON Schema — A standard vocabulary for describing the allowed shape of JSON data: which fields exist, their types, which are required and what values are allowed.
- database — A program that stores data in an organised way and answers questions about it, such as PostgreSQL.
- API contract — The written promise an API makes about its operations, inputs, outputs and errors, which callers rely on while the code behind it changes.
- database migration — A scripted, versioned change to a database's structure, such as adding a table or a constraint.
- relational database — A database that stores data in tables and links rows in one table to rows in another through shared key values.
- schema registry — A service that stores versioned schemas for Kafka data, gives each a numeric ID and checks new versions against compatibility rules.
- Apache Avro — A compact binary serialization format whose schemas are written as JSON documents.
- Protocol Buffers — A language-neutral way to define data structures and services in .proto files and encode messages in a compact binary format.
- schema evolution — Changing the structure of your data over time while keeping existing producers and consumers working.
- backward compatibility — The property that a new version of an interface still works for clients written against the old one.
- table — A named set of rows that all have the same columns, where each row records one fact about one thing.
- code first — An approach in which the C# entity classes are the source of truth for the database model and migrations generate the schema from them.
- upgradeneeded event — The IndexedDB event fired when a page opens a database with a higher version number than the stored one, the only place the schema can change.
- expand-and-contract — A way to change a live database in safe steps: add the new structure, move data and code to it, then remove the old structure.
- column — A named, typed field that every row of a database table has, such as name or price.
- Elastic Common Schema — Elastic's open specification of field names for logs and security events, using flat dotted names such as source.ip and user.name.
- OCSF — Open Cybersecurity Schema Framework: a vendor-neutral schema that describes security events as numbered classes with typed attributes.
- normalisation — Renaming fields from different log sources onto one agreed set of names, so one query works across all of them.
- constraint — A rule the database enforces on stored data, such as a column that must be unique or not null.
- CREATE TABLE — The SQL statement that defines a new table: its name, columns, types and constraints.
- shared database — One database used directly by several services.
- test isolation — The property that each test sets up everything it needs and leaves nothing behind, so tests pass in any order.
Taught in
- Reasoning Techniques — AI Engineering: LLM Apps, RAG & Agents
- Structured Output — AI Engineering: LLM Apps, RAG & Agents
- From Prompts To Context — AI Engineering: LLM Apps, RAG & Agents
- Function Calling — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Prompt Injection — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents
- The REST Constraints — Modern API Architecture: REST, GraphQL & gRPC
- Partial Responses — Modern API Architecture: REST, GraphQL & gRPC
- OpenAPI And Design-First — Modern API Architecture: REST, GraphQL & gRPC
- Contract Testing — Modern API Architecture: REST, GraphQL & gRPC
- WebSockets — Modern API Architecture: REST, GraphQL & gRPC
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC
- The Shared Responsibility Model — Cloud Infrastructure & Hyperscaler Architecture
- Managed Relational Databases (RDS) — Cloud Infrastructure & Hyperscaler Architecture
- Twenty Seconds Of Nothing — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Field The Registry Refused — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Stuck On One Record — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Twelve Lines Instead Of Four Hundred — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Connector That Was Created Twice — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Seventy One Percent — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Privacy Principles, GDPR Subject Rights & Minimization — Cybersecurity Fundamentals, GRC & Cryptography
- Restoration: Failed Deployment Recovery Time — DevOps & Site Reliability Engineering
- Admin Processes And The Open Source Update — DevOps & Site Reliability Engineering
- Deployment Strategies: Rolling Updates — DevOps & Site Reliability Engineering
- Entity Framework Core: Code First and Migrations — Modern .NET Core, C# & Enterprise Microservices
- IndexedDB In Practice: Object Stores, Indexes And Transactions — Frontend Architecture & Web Platform
- Service Worker Lifecycle: Installation, Activation And Update — Frontend Architecture & Web Platform
- Database Access & Migrations: ORM & Data Layers — Production Full-Stack Engineering
- Database Integration With Testcontainers — Modern Java: Virtual Threads & High-Throughput Services
- Bytes On The Wire: JSON, Avro And Protobuf — Apache Kafka & Event Streaming
- The Schema Registry — Apache Kafka & Event Streaming
- Compatibility Modes — Apache Kafka & Event Streaming
- Evolving An Event Without Breaking Consumers — Apache Kafka & Event Streaming
- Log Parsing, Schema Normalization (OCSF/ECS) & Extraction — Security Operations & Threat Hunting (SOC)
- Detecting Persistence: Tasks, Registry & Services — Security Operations & Threat Hunting (SOC)
- The SELECT Statement And Projection — PostgreSQL, Indexing & Relational Data Modeling
- Keys, Constraints And Referential Integrity — PostgreSQL, Indexing & Relational Data Modeling
- The Storage Decision: Relational Versus Document — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design One: Ticket Booking, Correctness First — Scalable System Design & Distributed Architecture
- Contract Testing Between Services — Automated Testing, TDD & Quality Engineering
- Testing With Real Databases — Automated Testing, TDD & Quality Engineering
References
- JSON Schema
- PostgreSQL docs: Schemas
- Confluent: schema registry overview
- JSON Schema
- IBM: what is a database schema
- Managing database schemas (EF Core)
- SQLite: the schema table
- PostgreSQL: Table basics
- Elastic Common Schema reference
- OCSF schema browser