▲ | Show HN: ChartDB Agent – Cursor for DB schema design(app.chartdb.io) | |||||||||||||||||||||||||||||||
121 points by guyb3 a day ago | 35 comments | ||||||||||||||||||||||||||||||||
Last year we launched ChartDB OSS (https://news.ycombinator.com/item?id=44972238) - an open-source tool that generates ER diagrams from your database (via query/sql/dbml) without needing direct DB access. Now we’re launching the ChartDB Agent. It helps you design databases from scratch or make schema changes with natural language. You can: - Generate schemas by simply describing them in plain English - Brainstorm new tables, columns, and relationships with AI - Iterate visually in a diagram (ERD) - Deterministically export SQL script Try it out here - https://chartdb.io/ai - no signup required. Or sign up and use it on your own database Would love to get your feedback :) | ||||||||||||||||||||||||||||||||
▲ | pella a day ago | parent | next [-] | |||||||||||||||||||||||||||||||
"an open-source tool" --> https://github.com/chartdb/chartdb ( AGPL-3.0 license ) prompts: https://github.com/chartdb/chartdb/blob/c3c646bf7cbb1328f4b2... | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | ako a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
In my experience most AI coding tools can work with databases, especially if you give it an MCP tool to connect to your (development) database. It will generate mermaid er-diagrams by reading from your database catalog, it will generate SQL to create tables, views, etc. It will generate queries, validate them and return data. It will optimize your query performance by running the query, running explain plan, looking into pg_stat_statements (or whatevery your database uses), and propose SQL optimization, indexes to be created. It will also create demo data with realistic use cases like black friday or back to school discounts for prices, etc. A SQL MCP + mermaid is all you need. Btw, it can also do an awesome job turning query plans into readable mermaid flow diagrams, adding details to the chart, using color to highlight bottlenecks. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | quentindanjou a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
This is really cool! Would love to use that for quite a bit of prototyping on some personal projects! Only thing I kinda dislike is the low readability of the connection because of that border around the table of the same color as the connection lines (I think things would look cleaner without it) | ||||||||||||||||||||||||||||||||
▲ | daxfohl a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Wow, how can you afford offering free AI on the homepage for an OSS project? I can barely afford AI APIs even for my own personal use. Seems like it would drive costs through the roof. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | trjordan a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
My conversation "Design a schema like Calendly" --> Did it "OK let's scale this to 100m users" --> Tells me how it would. No schema change. "Did you update the schema?" --> Updates the schema, tells me what it did. We've been running into this EXACT failure mode with current models, and it's so irritating. Our agent plans migrations, so it's code-adjacent, but the output is a structured plan (basically: tasks, which are prompt + regex. What to do; where to do it.) The agent really wants to talk to you about it. Claude wants to write code about it. None of the models want to communicate with the user primarily through tool use, even when (as I'm sure ChartDB is) HEAVILY prompted to do so. I think there's still a lot of value there, but it's a bummer that we as users are going to have to remind all LLMs for a little bit to do keep using their tools beyond the 1st prompt. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | asdev a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I can prompt an LLM to make a mermaid diagram and iterate on it. Why do I need "ChartDB"? | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | tdhz77 a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
The visual is really nice. I can appreciate this tool, but once it’s in my database it’s for the human to manage and update. Do I go back to using this tool? How can this help? I don’t want any tool to read data like mcp can. Read table names, sure. | ||||||||||||||||||||||||||||||||
▲ | daxfohl a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
It'd be nice if it also included the queries for each use case, and had a better understanding of sharding. As is, I gave it a bunch of requirements, it created some tables. Was it sufficient? No idea, it didn't say what the query was for each requirement. Would it scale? Again, no idea without the queries. (But actually, no, it wouldn't have scaled; some requirements were impossible without cross-shard scans). | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | stronglikedan a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
It seems very useful for people that haven't designed many databases (it follows good patterns), but I feel like I could build the ERD faster than I could build those detailed prompts (from the examples), and I would get the benefit of naming things my way. | ||||||||||||||||||||||||||||||||
▲ | kumarm a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
The UI presentation of Schema is really nice. Is there a javascript based UI for web that is used? | ||||||||||||||||||||||||||||||||
▲ | thomask1995 a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
This is super cool! Have you thought about making a tool to help preview/dry run migrations? I feel that's something I would want a ton of confidence in if an LLM is making migration scripts. Especially if it's doing scary stuff like breaking up a table. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | EcommerceFlow a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Super cool and useful, thank you. Was just doing some database mapping so this is perfect! | ||||||||||||||||||||||||||||||||
▲ | Macuyiko a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
On the homepage it says "Sinmple" above "Export SQL", fyi | ||||||||||||||||||||||||||||||||
▲ | uxhacker a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
And when will it do class designs? Maybe this would solve many an AI coding issue. | ||||||||||||||||||||||||||||||||
▲ | OsrsNeedsf2P a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
What can this do that Claude Code cannot? Is it just the ERD? | ||||||||||||||||||||||||||||||||
▲ | not--felix a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
The idea is great but it feels like it uses a dumb model | ||||||||||||||||||||||||||||||||
▲ | dorianmariecom a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
reddit has only two tables ;) | ||||||||||||||||||||||||||||||||
▲ | sergiotapia a day ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
to save tokens you should have a pre-baked replay play when you click those buttons i just want to see the end result and the process sped up since i dont know what the service does. good luck! | ||||||||||||||||||||||||||||||||
▲ | apwell23 a day ago | parent | prev [-] | |||||||||||||||||||||||||||||||
what makes this an "agent" | ||||||||||||||||||||||||||||||||
|