惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
T
Tailwind CSS Blog
V
Visual Studio Blog
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
量子位
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
Jina AI
Jina AI
雷峰网
雷峰网
博客园 - 【当耐特】
博客园 - 叶小钗
美团技术团队
宝玉的分享
宝玉的分享
IT之家
IT之家

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Chat with your database in plain English — locally, for free
retrovirusre · 2026-05-21 · via DEV Community

retrovirusretro

"What were our top 10 customers last quarter by revenue, as a bar chart?"

DB-GPT translates that to SQL, runs it against your database, and renders the chart. No SQL knowledge required. Fully local. MIT licensed. 17K GitHub stars — almost no English content.


What is DB-GPT?

DB-GPT is an open-source framework that puts a natural language interface on top of your databases. You connect PostgreSQL, MySQL, SQLite, or others — then ask questions in plain English. It generates the SQL, executes it, and can visualize results automatically.

Think Metabase meets AI, but fully self-hosted and free.


Supported Databases

PostgreSQL · MySQL · MariaDB · SQLite · ClickHouse · DuckDB · Spark SQL


Setup

Clone the repo, copy .env.example to .env, add your database connection string, then docker compose up -d. Open localhost:5670admin / admin → Settings → Database → Add → paste connection string.

Full docker-compose: chinese-ai-tools-english-guide/tools/db-gpt


Example Queries

Once your database is connected:

  • "Show total sales by month for the last 12 months as a bar chart"
  • "Which products have inventory below 10 units?"
  • "Top 5 customers by order value with their email addresses"
  • "Average order fulfillment time grouped by warehouse"

DB-GPT generates SQL for each, runs it, returns results. Charts render automatically in the UI.


Connecting Ollama

Settings → LLM Provider → Ollama → Base URL: http://ollama:11434/v1 → Model: llama3

For best SQL accuracy use sqlcoder — fine-tuned specifically for SQL generation. Pull it with docker exec -it ollama ollama pull sqlcoder.


DB-GPT vs Vanna.ai

Both let you query databases with natural language:

DB-GPT Vanna.ai
License MIT MIT
Built-in UI ✅ Full app Minimal
Charts ✅ Built-in ❌ External
Visual pipeline ✅ AWEL
Self-hosted

DB-GPT if you want a complete self-contained app. Vanna.ai if you're embedding the capability programmatically into your own product.


n8n Automation

A ready-to-import workflow JSON is in the repo (integration/n8n-workflows/db-gpt-query.json). POST {question, db_name} → returns {answer, sql, data}.


Full Guide

chinese-ai-tools-english-guide

Previous articles in this series:


Your data never leaves your machine. No API keys, no cloud, no SQL knowledge needed.