16. AI2SQL Dictionary Template


This document is an AI to SQL Dictionary template, designed to facilitate the mapping of natural language terms to SQL schema elements for any database. This guide is intended for data analysts, developers, and database administrators to improve query efficiency and understanding of the database structure.

General Information

  • Dictionary Name: [Dictionary Name]

  • Creation Date: [Creation Date]

  • Version: [Version Number]

  • Author: [Author Name]

  • Description: A comprehensive dictionary for mapping natural language terms to SQL schema elements in [Database Name].

Schema Mapping

This section should detail the mapping of natural language terms to their corresponding SQL tables, columns, and relationships in the database.


Mapping of general terms to specific SQL table names.

Natural Language TermSQL Table Name






Mapping of general terms to specific SQL column names.

Natural Language TermSQL Column Name






Describing the relationships between different tables and columns.

Natural Language DescriptionSQL Relationship Expression


[SQL Expression]

Business Logic Rules

Describe specific business logic rules applied within the database.

Rule IDDescriptionNatural Language ExpressionSQL Expression



[Natural Language Term]

[SQL Expression]

Synonyms and Aliases

List synonyms and aliases for natural language terms to aid in query formulation.

Natural Language TermSynonyms/Aliases



Special Cases and Exceptions

Detail how to handle unique or unusual cases within the database.

  • Case ID: [ID]

  • Description: [Description]

  • Handling Instructions: [Instructions]

Change Log

Document the history of changes made to the dictionary.

  • [Date]: [Change Description]

This template can be customized for any database by filling in specific details related to the database schema, business rules, and terminology. It's important to keep this document updated to reflect any changes in the database structure or business logic.

Last updated