Chat2DB

Chat2DB: Smart SQL client with ChatGPT

1 min


[vc_headings linewidth=”0″ borderwidth=”1″ borderclr=”#000000″ title=”Chat2DB” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” titlesize=”60″ titleclr=”#000000″]Smart SQL client with ChatGPT[/vc_headings]
Github logo

Chat2DB is an open-source tool for multiple databases from Alibaba. Unlike traditional database clients like Navicat and DBeaver, Chat2DB has AIGC capabilities that can turn natural language into SQL, and vice versa. It can also give SQL optimization tips to boost developers’ efficiency. It is a tool for database developers in the AI era, and even non-SQL users can use it to query data and generate reports quickly.

[vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Features” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2871″][/vc_headings]

AI intelligent assistant

You can use natural language to write and execute SQL queries, or convert SQL queries to natural language for better understanding. You can also get suggestions for optimizing your SQL performance and readability.

Team collaboration

You can share your work with your teammates without exposing your online database password, ensuring the security of your enterprise database account.

Data management

You can manage various data objects, such as tables, views, stored procedures, functions, triggers, indexes, sequences, users, roles, and authorizations, with ease and efficiency.

Extension capability

You can connect to multiple databases, such as MySQL, PostgreSQL, Oracle, SQLServer, ClickHouse, OceanBase, H2, SQLite, and more. We are constantly adding support for more databases in the future.

Cross-platform development

You can use our product on Windows, Mac, Linux, or web browsers, thanks to our front-end development using Electron.

Environment isolation

You can separate your online and daily data permissions, ensuring the safety and integrity of your data.

[vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Downloads” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2852″][/vc_headings]

Windows

windows

MacOS ARM64

macos

MacOS X64

macos

JAR

java
[vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Getting Started 🚀” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2854″][/vc_headings]

AI Configuration

CONFIGURE OPENAI

Option (1): To access the ChatSql feature of OPENAI, you need to satisfy two requirements:

  • You need an OPENAI_API_KEY.
  • To access the OPENAI website from the client’s network, you may need a VPN if you are in China. Make sure your VPN works well, or use the network proxy settings in the client to specify the HOST and PORT.

Option (2): Unified Proxy Service

  • No OPENAI_API_KEY is required.
  • You can access the service without using a proxy or VPN, provided that you have a network connection.

To access Chat2DB AI features faster, you can use WeChat to request your own API_KEY. The process is simple and easy.

🐳Docker installation

docker pull chat2db/chat2db:latest

⚙️ Operating Environment

Note: If local debugging is required

  • Java runtime Open JDK 17
  • JRE reference packaging and deployment method of jre.
  • Node runtime environment Node16 Node.js.

💻 Local Debugging

  • git clone to local
$ git clone git@github.com:alibaba/Chat2DB.git
  • Front-End installation
$ cd Chat2DB/ali-dbhub-client
$ npm install # Mounting front-end dependency
$ npm run build:prod # Package js to the source directory on the back end
  • Backend debug
$ cd ../ali-dbhub-server
$ mvn clean install # maven 3.8 or later needs to be installed
$ cd ali-dbhub-server/ali-dbhub-server-start/target/
$ java -jar -Dchatgpt.apiKey=xxxxx ali-dbhub-server-start.jar  # To launch the chat application, you need to enter the ChatGPT key for the chatgpt.apiKey. Without entering it, you won't be able to use the AIGC function.
$ # open http://127.0.0.1:10821 to start debug Note: Front-end installation is required
  • Front-End debug
$ cd Chat2DB/ali-dbhub-client
$ npm install 
$ npm run start 
$ # open http://127.0.0.1:10821  to start Front-End debug
$ # Note Front-end page completely depends on the service, so front-end students need to debug the back-end project

To debug the front end, you need to map the resources. You can use XSwitch and add this configuration file.

{
  "proxy": [
    [
      "http://127.0.0.1:10821/(.*).js$",
      "http://127.0.0.1:8001/$1.js",
    ],
    [
      "http://127.0.0.1:10821/(.*).css$",
      "http://127.0.0.1:8001/$1.css",
    ],
    [
      "http://127.0.0.1:10821/static/front/(.*)",
      "http://127.0.0.1:8001/$1",
    ],
    [
      "http://127.0.0.1:10821/static/(.*)$",
      "http://127.0.0.1:8001/static/$1",
    ],
  ],
}

[mvc_advanced_button align=”center” btn_text=”Github” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”fab fa-github” btn_url=”url:https%3A%2F%2Fgithub.com%2Falibaba%2FChat2DB|target:_blank” btn_clr=”#ffffff” btn_bg=”#0a0a0a” btn_radius=”50″]
[mvc_advanced_button align=”center” btn_text=”Website” icon_size=”25″ use_theme_fonts=”yes” btn_url=”url:https%3A%2F%2Fchat2db.opensource.alibaba.com%2F|target:_blank” btn_clr=”#ffffff” btn_bg=”#4785f7″ btn_radius=”50″ btn_icon=”fas fa-globe”]
[mvc_advanced_button align=”center” btn_text=”EMail” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”far fa-envelope” btn_url=”url:mailto%3A1558143046%40qq.com|target:_blank” btn_clr=”#ffffff” btn_bg=”#0e76a8″ btn_radius=”50″]

Like it? Share with your friends!

0

0 Comments

Your email address will not be published. Required fields are marked *

Belmechri

I am an IT engineer, content creator, and proud father with a passion for innovation and excellence. In both my personal and professional life, I strive for excellence and am committed to finding innovative solutions to complex problems.
Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube and Vimeo Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format