Schema
The structural blueprint of a database that defines tables, columns, data types, relationships, and constraints.
In Depth
A database schema is the formal definition of how data is organized within a database. It describes the tables (or collections), the columns (or fields) within each table, the data types for each column, relationships between tables (foreign keys), indexes, constraints (unique, not null, check), and other structural elements. Schemas serve as both documentation and enforcement mechanisms—they tell the database engine what data is valid and how tables relate to each other. Schema awareness is critical for text-to-SQL systems, as the AI must understand the schema to generate correct queries.
How AI for Database Helps
AI for Database automatically reads your schema to understand table relationships, column types, and naming conventions, enabling accurate query generation.
Related Terms
Relational Database
A database that organizes data into structured tables with rows and columns, linked by defined relationships.
Foreign Key
A column in one table that references the primary key of another table, establishing a link between them.
Migration
A version-controlled change to a database schema, such as adding tables, columns, or modifying constraints.
Ready to try AI for Database?
Query your database in plain English. No SQL required. Start free today.