Introducing DataLang - Ask questions to your Database in Natural Language
Tags: ai, sql, saas, nocode
Published: 2023-06-16 18:00:35

---
title: Introducing DataLang - Ask questions to your Database in Natural Language
published: true
description: Set your data source, ask a question in natural language, and get an answer, SQL, and database rows.
tags: ai,sql,saas,nocode
cover_image: https://yahooder.sirv.com/datalang/seo/cover.jpg
# Use a ratio of 100:42 for best results.
---

**[DataLang](https://datalang.io/demo?ref=dev.to&utm_content=introducing)** is yet another AI _(prompt engineering)_ tool that is set to change the way you interact with databases. I'm excited to introduce you to our platform that allows you to communicate with your database using natural language!

Try the [live demo](https://datalang.io/demo?ref=dev.to&utm_content=introducing) or [watch the demo](https://www.loom.com/share/1e28c89ed4b54085bdaa848bfd3f782e).

## Why DataLang?

Working with databases can be a daunting task, especially for non-technical team members. Even for those adept at writing SQL queries, it can sometimes be a time-consuming process. What if there was a tool that could understand your natural language questions and convert them into SQL queries? That's where DataLang comes in.

## What Can DataLang Do?

DataLang is designed to make database interaction intuitive and user-friendly. Here's how it works:

1. You set up your data source **connection string**.
2. DataLang fetches all the **schema tables** and columns from your data source.
3. **You ask a question** in natural language, such as _"How many users signed up this month?"_
4. DataLang sends your question to **GPT** _(OpenAI)_.
5. GPT processes your question and generates an **SQL query**.
6. The **SQL query executes** in your database.
7. A **natural language response** is returned.

## Security Measures

### Credential Encryption

I understand the importance of data security. That's why your data source credentials are encrypted before being stored in the DataLang database, and only decrypted before executing SQL. I use [this method](https://gist.github.com/AlexandroMtzG/9e0ebd0751f49e3f6d8b1eac3651195b) to encrypt/decrypt credentials.

### Dangerous SQL Statements Prevention

My prompt engineering method uses 4 prompts:

1. Understanding the end-user question
2. Interpreting the DB schema + making sense of the question
3. Crafting SQL statements (SELECT only)
4. Final SQL safety check

In the 4 steps, the prompts make sure to throw an **"Unsafe question"** error if it identifies dangerous operations, such as INSERT, UPDATE, DELETE, ALTER, DROP...

## API

Use your account API Keys to send questions in the following format:

![Send a POST request to the Questions API](https://yahooder.sirv.com/datalang/features/api-request.png)

## Pricing That Suits Your Needs

We offer different pricing plans to fit your needs and usage:

- **Hobby:** 2,000 questions/month, 1 data source, and 1 user.
- **Growth:** 5,000 questions/month, 3 data sources, 3 users and API access.
- **Enterprise:** 10,000 questions/month, 10 data sources, 10 users, API access, and priority support.

You can also ask for a quote to have it in a custom server, have more questions per month, or have a custom feature developed, [contact us](https://datalang.io/contact?ref=dev.to&utm_content=introducing)!

[Try DataLang](https://datalang.io/pricing?ref=dev.to&utm_content=introducing) today!

--

I built this MVP with my SaaS framework [SaasRock](http://saasrock.com/?ref=dev.to&utm_content=introducing), so I'll wait for user feedback before adding more features. I'm not doing the same mistake of over-engineering a product before actually having users 😅.

[Subscribe to the newsletter](https://datalang.io/newsletter?ref=dev.to&utm_content=introducing) for more!