ThinkDB is an easy-to-use SQL client that makes working with your databases simpler and more efficient. Whether you're a database pro or just getting started, ThinkDB's intuitive interface helps you explore, query, and manage your data with ease.
OTHER License
Smart Query Interface: Write SQL queries effortlessly with our query interface enhanced by smart code completion, helping you code faster and with fewer errors.
QChat: Engage in a conversational dialogue with our AI assistant. Simply ask questions in natural language, and QChat responds with precise SQL queries and real-time data results.
Virtual DBA Chat: Consult with an AI-powered virtual Database Administrator capable of performing tasks that a seasoned DBA would handle. Need to optimize queries, set up database backups, configure security settings, or get performance tuning advice? The virtual DBA is here to assist you.
Whether you’re an experienced database professional or just starting out, ThinkDB provides an intuitive and natural interface to explore, query, and manage your data with unparalleled ease.
Looking for CLI version? Checkout our powerful range of AI powered CLI Tools 👉 CommandAI
Please note that ThinkDB is currently in its alpha stage. While we are continuously working to improve and stabilize the application, you may encounter bugs. We appreciate your understanding and welcome any feedback to help us enhance the product.
To get ThinkDB up and running quickly using DockerHub:
Pull the latest Docker image:
docker pull thinkthinkai/think_db:latest
Run the container while ensuring SQLite database persistence and setting the SECRET_KEY_BASE
environment variable. Remember to replace directory_on_your_machine_for_think_db_storage
and your_secret_key_base_here
with your actual directory path and secret key base:
# change directory_on_your_machine_for_think_db_storage
docker run -d --name thinkdb -p 3000:3000 -v directory_on_your_machine_for_think_db_storage:/app/storage thinkthinkai/think_db:latest
It's outside the scope of this README to walk you through securing your Docker container and any web application you host within it. However, we strongly recommend that:
TLS/SSL: Always serve your web application over HTTPS using a valid TLS certificate to encrypt data transmitted over the network.
To run ThinkDB locally using Rails:
Before you start, ensure you have the following installed:
Clone the repository:
git clone https://github.com/ThinkThinkAI/ThinkDB.git
cd ThinkDB
Install the necessary gems:
bundle install
Set up the database:
bin/rails db:setup
Start the application with the SECRET_KEY_BASE
environment variable set:
foreman start
ThinkDB is highly configurable to suit your needs. Below are the steps to configure it properly:
You can configure the AI services ThinkDB uses to generate and optimize SQL by setting the AI URL, model, and API key. This can be done via the Settings interface in the application.
Navigate to the Settings Page
Fill in AI Service Information:
Here's an example of how you can configure for various AI services:
ChatGPT:
https://api.openai.com/v1
Mistral:
https://api.mistral.ai/v1/completions
Ollama:
http://127.0.0.1:11434
(if running locally)OpenAI Compatible:
Proper configuration ensures that ThinkDB can interact with your databases efficiently:
Navigate to New Data Source:
Fill in Data Source Information:
If you encounter any bugs or have suggestions for improvements, please open an issue on the GitHub repository. To help us understand and address the issue, please include the following information:
Description: Provide a clear and concise description of the bug or feature request.
Steps to Reproduce: List the steps needed to reproduce the bug. This is crucial for us to identify and fix the problem.
Expected Behavior: Explain what you expected to happen.
Actual Behavior: Describe what actually happened. Include any error messages or logs if applicable.
Environment: Provide details about your environment, such as the operating system, browser, and versions of any relevant libraries and tools.
Example:
**Description**:
The application crashes when I try to add a new data source.
**Steps to Reproduce**:
1. Navigate to the 'New Data Source' page.
2. Fill in the details and click 'Save'.
3. Application crashes.
**Expected Behavior**:
The new data source should be saved without any issues.
**Actual Behavior**:
The application crashes with an 'Internal Server Error'.
**Environment**:
- OS: Windows 10
- Browser: Google Chrome Version 93.0.4577.63
- ThinkDB Version: 1.2.3
Including these details will help us resolve issues more quickly. Thank you for helping us improve ThinkDB!