Core Concepts

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

Ready to try AI for Database?

Query your database in plain English. No SQL required. Start free today.