Live data from Hacker News

Found a simple tool for database modeling: dbdiagram.io

dbdiagram.io

71–76 of 76 posts

Re: Found a simple tool for database modeling: dbdiagram.io

#71
post #48
post #40

Earlier quoted context omitted.

Huh, weird stuff! Your linked image shows what appear to be tables, and the little arrows appear to represent entity-relationships between them. But I'm not sure how you'd get useful DDL out of it -- none of the columns have types, no indices, etc.! Maybe an LLM could sketch out a DDL skeleton from a picture, which someone could use as a starting point?

LLMs can infer a lot of details from "common sense" (i.e. statistical association). As a human, I can figure out what each field's types should be, so your frontier LLM could, too: https://chatgpt.com/share/680e3a90-8660-8003-998f-91ad98e32f...

You and a LLM can guess at what the types might be, but those guesses are a suggestion that a human needs to evaluate, they're not something you can just pass thru as assumptive defaults. In your link, for example, I would definitely not want CategoryID to be an INT, or UnitPrice to be a DECIMAL, or etc.

Re: Found a simple tool for database modeling: dbdiagram.io

#73
Looks cool, but a bit of a bummer it's not open source. These days when I need to sketch out SQL/database diagrams, I usually have an LLM generate Mermaid code for me — good enough for quick drafts.

If I want something cleaner or a little more "presentation ready," I switch to d2 (https://d2lang.com/tour/sql-tables/#basics). It's got really simple syntax and does a great job laying out entity-relationship diagrams without much tweaking.

Re: Found a simple tool for database modeling: dbdiagram.io

#74
post #71
post #48

Earlier quoted context omitted.

LLMs can infer a lot of details from "common sense" (i.e. statistical association). As a human, I can figure out what each field's types should be, so your frontier LLM could, too: https://chatgpt.com/share/680e3a90-8660-8003-998f-91ad98e32f...

You and a LLM can guess at what the types might be, but those guesses are a suggestion that a human needs to evaluate, they're not something you can just pass thru as assumptive defaults. In your link, for example, I would definitely not want CategoryID to be an INT, or UnitPrice to be a DECIMAL, or etc.

Sure, yeah - but just like with a human, I can provide additional domain context that can clarify its answer. I see your point - you need to know what to provide in order to get the result you want - but I think that today, that makes it a very useful tool, and tomorrow, it'll be able to make those clarifications itself.

(Out of curiosity, what would you use instead? I'd default to INT/DECIMAL respectively myself - would love to know what your thinking is here!)

Re: Found a simple tool for database modeling: dbdiagram.io

#75
post #74
post #71

Earlier quoted context omitted.

You and a LLM can guess at what the types might be, but those guesses are a suggestion that a human needs to evaluate, they're not something you can just pass thru as assumptive defaults. In your link, for example, I would definitely not want CategoryID to be an INT, or UnitPrice to be a DECIMAL, or etc.

Sure, yeah - but just like with a human, I can provide additional domain context that can clarify its answer. I see your point - you need to know what to provide in order to get the result you want - but I think that today, that makes it a very useful tool, and tomorrow, it'll be able to make those clarifications itself. (Out of curiosity, what would you use instead? I'd default to INT/DECIMAL respectively myself - w…

I'd default to CategoryID being a string, with uniqueness constraints defined on the categories table. And UnitPrice to be a composite type, containing a [u]int amount and a string denomination, e.g. `10000 USD_CENT` or something like that.

But what you or I or anyone thinks is the right type for these or any columns, is totally beside the point. The point is that the type for a column isn't really assume-able by an LLM, at least not automatically.

Re: Found a simple tool for database modeling: dbdiagram.io

#76

I maintain an almost exhaustive list of text to diagram tools [1]. dbdiagram.io requires login to export. Other dedicated text to database diagram tools are 1. Database Diagram Tool https://databasediagram.com/app 2. QuickDBD https://app.quickdatabasediagrams.com/#/ 3. ERD Lab https://app.erdlab.io/designer/guest (Requires Login to Export) [1]: https://xosh.org/text-to-diagram/

Thank you for your list and webpage. Those are great!
Post reply on HN