AskYourDatabase: A New Plugin for ChatGPT
Published: 2023-07-31 13:39:11

### After several days of development, ChatGPT Plugin **AskYourDatabase** is now available on ChatGPT Plugin Store:


![AskYourDatabase Plugin Store](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyr83lor1yx4li4hxflc.png)

With this plugin, now you can query your database (Currently support MySQL and PostgresSQL) in natural language:

![Querying in natural language](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxmnyn9rh8m558f702b5.png)

Just provide the URI of your database and ChatGPT will automatically connect to it, read the schema, and understand your database. After which, you can ask, query, insert data, and even get statistics from your DB in a natural way, no SQL needed!

![Database connection and schema understanding](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zrue3oo3ss5ohuad665.png)

With retool, you can connect your database and make some dashboard quickly, and with AskYourDatabase, you can directly get what you need instantly by asking ChatGPT!

With AskYourDatabase, you can have your own private SQL database but with natural language.

Now I use it to write my diaries with a Vercel Serverless Postgres (completely free).

Now I want to list all my diaries and translate them into English:

![Listing and translating diaries](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55qe6s00mka4qwjhukmt.png)

And write a new diary:

![Writing a new diary](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9m5brb0wb9g3hkv0znd1.png)

What's more, you can store new kinds of data, but let ChatGPT design the table Schema for you, and auto-fill the data as needed, like the current date. If some required data is not provided, ChatGPT will ask you for it.

Let's say I want to create a Todolist and let ChatGPT deal with the rest:

![Creating a Todolist](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tn2dfjieb9qng6snsj2k.png)

Add a todo for me:

![Adding a todo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vxq2gm8ocwqm1nf1xpcy.png)

And even get charts directly from the data by using other plugins like Diagrams:

![Generating charts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67e26hmqprlcbae0btpx.png)

Some people will say this exposes some risks for your DB, but the same holds for tools like Retool (You need to whitelist your IP to retool and let it connect your DB).

As the author of AskYourDatabase, our architecture promises my user that the plugin will never store anything about user data, like URI and other related data.

The plugin is basically a Stateless application (no database, only a middleware, and you can read the [Terms and Conditions](https://www.askyourdatabase.com/legal).

And after all, you can have your own PostgresSQL at [Stores by Vercel](https://vercel.com/dashboard/stores), and get your own powerful and private DB, and let ChatGPT deal with all complex parts. You can store literally any kind of data into it without writing a single line of code.

## About the future

Currently plan:

1. Support more kinds of DB, like MongoDB, ClickHouse, etc.
2. Provide built-in visualization function, may generate a Chart or table by a link for you and once you open the link you can view the newest data.
3. Provide some javascript or python runtime and can run code in serverside and provide more complex stuff like cronjob or something.

The vision of AskYourDatabase is to empower individuals to build their CRUD (Create, Read, Update, Delete) applications without writing a single line of code. This idea is rooted in my perspective on the nature of CRUD backends. Most backend code essentially translates user requests into SQL commands and connects to other services. If all this code could be generated by AI on-the-fly, we might not need traditional concepts like controllers, services, and data access objects (DAOs). Instead, all we would need is a database and a sandbox for executing code.

I believe AskYourDatabase will change how people interact and make use of Database, and will be playing a role in how people build internal tools like what Retool is currently doing.