AI & ML

Schema Linking

Schema linking is the step in text-to-SQL where words in a user's question are matched to the specific tables and columns in the database that they refer to.

In Depth

When you ask "show me revenue by region", nothing in your database is literally called "revenue" or "region"—the system has to figure out that revenue means SUM(order_items.price * quantity) and region means customers.country grouped into territories. That mapping is schema linking, and it is where most text-to-SQL errors originate: get the linking wrong and the SQL can be syntactically perfect yet answer a different question. Strong schema linking uses column names, data types, foreign keys, sample values, and any available descriptions to resolve what the user meant. It is why the same AI performs very differently on a well-documented schema versus a cryptic one.

How AI for Database Helps

AI for Database performs schema linking automatically using your introspected schema, so everyday business words map to the right tables and columns.

Related Terms

Ready to try AI for Database?

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

Free plan available · No credit card required