Live data from Hacker News

Found a simple tool for database modeling: dbdiagram.io

dbdiagram.io

1–10 of 76 posts

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

#2
While discussing data models, my colleague was sketching tables and their relationships in an editor: table A, table B, columns linking them.

He then generated SQL from the diagram and deployed the schema to PostgreSQL. The schema was shared and reviewed.

The tool is https://dbdiagram.io

You can import/export SQL and generate images of your schema.

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

#3
post #2

While discussing data models, my colleague was sketching tables and their relationships in an editor: table A, table B, columns linking them. He then generated SQL from the diagram and deployed the schema to PostgreSQL. The schema was shared and reviewed. The tool is https://dbdiagram.io You can import/export SQL and generate images of your schema.

DBML is great. I hope it becomes a standard

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

#6
post #5

I have found that ChatGTP and Claude are good at converting a picture of a schema to SQL. So I sketch the schema by hand and the LLM creates the SQL. It can also save the picture as a mermaid text for future edits. Pretty neat.

I had the opposite problem, was given SQL ddl with near 1000 tables and hundreds of constraints, and had to produce the schema map. Ran the ddl and connected it to yEd, and hey presto, schema map!

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

#8
post #5

I have found that ChatGTP and Claude are good at converting a picture of a schema to SQL. So I sketch the schema by hand and the LLM creates the SQL. It can also save the picture as a mermaid text for future edits. Pretty neat.

"A picture of a schema"? What does this mean?

And by SQL do you mean DDL?

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

#9
post #8
post #5

I have found that ChatGTP and Claude are good at converting a picture of a schema to SQL. So I sketch the schema by hand and the LLM creates the SQL. It can also save the picture as a mermaid text for future edits. Pretty neat.

"A picture of a schema"? What does this mean? And by SQL do you mean DDL?

> "A picture of a schema"? What does this mean?

A hand-drawn picture of a database schema. Something like this:

https://www.dreamstime.com/stock-images-database-schema-imag...

> And by SQL do you mean DDL?

DDL is a subset of SQL, so the distinction is moot.

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

#10
post #7

The FLOSS tool https://drawdb.vercel.app/editor has been here on HN several times. IMHO also does a somewhat better job.

Doesn't seem to work on mobile at all. Tables that I add are not shown in the diagram. The diagram area is not visible unless I scroll sideways.I cannot scroll sideways, unless I request desktop site and scroll there. But I still don't see any entities in the diagram. When I use the buttons to add tables in the diagram, they also do not show up in the grid, but only on the left in the textual list of tables. Seems like a complete non-functional tool on mobile.

Usually I wouldn't care too much about a tool like this running on mobile, but not at a PC right now, so that's all I can give feedback about.

Post reply on HN