# SQL

Dolt's SQL engine is built as a layer on top of its storage engine. This allows us to implement non-SQL operations, such as the CLI commands, directly against the storage layer. It also leaves the door open to build additional database dialects on top of Dolt in the future.

The SQL engine is implemented by three different open source projects, listed below.

## vitess

[vitess](https://github.com/dolthub/vitess) is a MySQL sharding management system. It implements the MySQL parser and the MySQL server, including the wire protocol.

[Read more about the vitess project and how it's used in Dolt.](/architecture/sql/vitess.md)

## go-mysql-server

[go-mysql-server](https://github.com/dolthub/go-mysql-server) is a storage agnostic SQL query engine written in pure Go. It implements a query analyzer and execution engine, and defines interfaces for storage backend integrators (like Dolt) to implement.

[Read more about the go-mysql-server project and how it's used in Dolt.](/architecture/sql/go-mysql-server.md)

## Dolt

The Dolt project itself implements the interfaces defined in [go-mysql-server](https://github.com/dolthub/go-mysql-server) to make the Dolt storage engine available for reads and writes in a SQL context. It also implements many System variables and custom SQL functions.

Dolt is responsible for the various interfaces to start, stop, configure and manage SQL servers.


---

# Agent Instructions: 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://docs.dolthub.com/architecture/sql.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.
