> For the complete documentation index, see [llms.txt](https://ai2sql.gitbook.io/ai2sql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai2sql.gitbook.io/ai2sql/16.-ai2sql-dictionary-template.md).

# 16. AI2SQL Dictionary Template

### Introduction

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.

#### Tables

Mapping of general terms to specific SQL table names.

| Natural Language Term | SQL Table Name |
| --------------------- | -------------- |
| \[Term]               | \[TableName]   |
| \[Term]               | \[TableName]   |

#### Columns

Mapping of general terms to specific SQL column names.

| Natural Language Term | SQL Column Name |
| --------------------- | --------------- |
| \[Term]               | \[ColumnName]   |
| \[Term]               | \[ColumnName]   |

#### Relationships

Describing the relationships between different tables and columns.

| Natural Language Description | SQL Relationship Expression |
| ---------------------------- | --------------------------- |
| \[Description]               | \[SQL Expression]           |

***

### Business Logic Rules

Describe specific business logic rules applied within the database.

| Rule ID | Description    | Natural Language Expression | SQL Expression    |
| ------- | -------------- | --------------------------- | ----------------- |
| \[ID]   | \[Description] | \[Natural Language Term]    | \[SQL Expression] |

***

### Synonyms and Aliases

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

| Natural Language Term | Synonyms/Aliases |
| --------------------- | ---------------- |
| \[Term]               | \[Synonyms]      |

***

### 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai2sql.gitbook.io/ai2sql/16.-ai2sql-dictionary-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
