
Gallery of database schema diagrams of open-source packages - dennisong
https://drawsql.app/templates
======
dennisong
Hey all, maker of DrawSQL here. To dog-food the app over the past year, I've
been mapping out the database schemas of open-source packages and apps... lots
of them in fact!

Then it clicked, these collected diagrams could be useful for other developers
to use as references as well. And maybe bring some SEO juice to the DrawSQL
over the long-term. Hence the idea to curate this gallery - A central place to
browse & discover DB schemas.

First time posting in HN, let me know what you think, or if you have a schema
to suggest that should be added. Thanks!

~~~
inspector14
this looks great.

I would use it in a heart beat if there were an option for a one time license
/ activation fee and the ability to use it offline without associating the
graphs with an account & communicating them back to a central server. my guess
is that there may be more folks like me who work at companies that require a
certain level of anonymity or security regarding sensitive information like
database schemas. just a thought!

~~~
dennisong
Thanks, good to know of the alternate constraints in other companies. Pricing
aside, indeed it would be a different challenge tech-wise to have this as an
offline tool.

My motivation for building this stemmed from the use-case of smaller-medium
dev teams. We were using offline tools (e.g. MySQL Workbench) as part of our
dev process and trying to keep it updated as documentation. Which was quite a
nightmare to keep in sync between different devs. In this case having a
central server was the silver bullet.

Curious - do you all currently use other tools (eg: workbench) for this?

~~~
evanelias
It could be interesting to separate the visualization functionality from the
syncing/sharing aspect.

For example, if you store the schema representation as a logical dump (CREATE
statements) in a git repo, syncing/sharing becomes trivial. This also provides
a branch workflow for collaborative editing, and the commit history serves as
an authoritative changelog.

From this point of view, it could be compelling to have an offline
visualization tool that simply operates on top of the current local filesystem
state of a repo. Ideally this could be paired with a self-hosted server/daemon
that can generate a visualization of any arbitrary commit of a remote repo on
GitHub, GitLab, etc.

Disclosure: I'm the author of an open source schema management tool
[https://skeema.io](https://skeema.io) which is designed to support a repo-
driven workflow for DDL execution. So I have a heavy bias towards storing
schemas declaratively, as repos of CREATE statements.

------
ardy42
[https://drawsql.app/templates/hacker-
news](https://drawsql.app/templates/hacker-news):

> Database schema for

> Hacker News

> Social news website: Sample database schema diagram for Hacker News, _from
> open-sourced Pythonic News_

Seems a little misleading. It's the schema from a clone, not a the original
Hacker News site that most people think of when they see the title.

~~~
dennisong
Fair point, changed that now, thanks for the feedback!

------
gavinray
Tried it out, there are several similar tools (DB Diagram being closest) but
this has the nicest UI, I think. Really solid job on the UX details like tab-
completion + enter/select when typing column types in tables.

Auto-layout would be a useful feature, a button to click to re-arrange the
table cards in a nice way (unless I missed it).

Also: Made in Vue! I <3 Vue

~~~
dennisong
Thanks! Definitely put a lot of attention on the UX so glad to hear it's been
a differentiator.

Auto-layout would indeed be nice might be a bit of a challenge tech-wise.
Thanks for suggesting it!

~~~
sqlcook
This is indeed one of the nicest UI's I've seen, is this all custom made or
are you using some open components? I wanted to get similar effect for
something completely different I had in mind (like a flow based diagram), any
advice greatly appreciated.

------
mellosouls
This reminds me of a website that has been around for many years offering free
example schemas, or at least free pictures of them. I think in this case they
are just internally created rather than collected from external sources, and I
don't know the quality or general usefulness, but perhaps handy as a prompt at
least.

[http://www.databaseanswers.org/data_models/](http://www.databaseanswers.org/data_models/)

------
shrikant
This appears to have more features and is more generous in the free tier than
my usual go-to for this sort of thing:
[https://www.dbdesigner.net/](https://www.dbdesigner.net/)

It also looks slicker and handles a bit easier, so I think I'm going to
switch!

------
HighlandSpring
Your diagrams are awesome! Are there any lessons you'd be keen to share from
creating a diagramming UX in Vue.js? Are you rolling your own or standing atop
another library?

~~~
swah
Interesting - the diagram isn't SVG based. I agree with you - one of the
nicest I've seen lately. Was similarly blown away by Whimsical, see
[https://whimsical.com/P53PjXCBWEi2fdMjP2Hti](https://whimsical.com/P53PjXCBWEi2fdMjP2Hti)

------
dang
Curated lists can't be Show HNs:
[https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html).
Obviously your app itself could be, but that's not this thread.

Also, could you please change the name of the Hacker News one? As commenters
have pointed out, it's misleading.

~~~
dennisong
Thanks for the feedback, wasn't aware of the curated list rule before. Good to
know for the future.

Also, fixed up the naming for the HN template as well, cheers!

------
curo
This is great. I first tried to find Airtable or Notion, obviously they're not
open source but I'm curious about the meta schemas for apps with user defined
schemas and can't seem to find a good answer.

------
725686
A bit tangential, but I hate that products like DrawSQL only have a
subscription models. It seems interesting, and would like to use it but why
should I pay for a subscription? What if I only need it for 1 project? Why
should I keep paying every month when I will rarely be touching the model
every now and then? I understand that software is expensive to build, maintain
and grow, but I just can't seem to tolerate subscription models for every
single product. There are some products/services that make sense to charge
like that but nowadays everything seems to be like that.

~~~
manquer
Such apps are not targeted towards occasional user like you. These products
are more targets towards people who need to constantly work with schemas ,
architects/ consultants etc . Perhaps they are more likely to pay in the first
place . As you say it is hard to pay if you need it rarely .

perhaps tools like datagrip make more sense for you ? Especially if you
already are in jetbrains ecosystem (although they have annual pricing as well,
if you don’t renew you get last version your subscription covered Perpetually
)

------
120bits
The timing couldn't be more perfect. I'm currently working on re-designing a
multi-tenant database schema with user-roles and stuff. I was looking for some
tool like this. Thank you! Looks good.

~~~
moltar
I’m starting to work on this too :)

Any reference material to share?

------
bane
What's really interesting I think is how "opposite" of enterprise software
these ER diagrams look. Whatever happened to the thousands upon thousands of
identical tables in a standard Oracle-backed enterprise solution?

It's almost like these things were designed without the intention of having to
spend a fortune on consulting services.

~~~
dubcanada
Huh lol?

These are simple tables for simple services, like one of these diagrams is
legit the boilerplate of Laravel and another is Spark which is a SAAS
boilerplate built on top of laravel.

Very few of these are actual software in use, most seem to be boilerplates
from different systems. And even the actual software tend to be lower level
systems that require very little tables.

You are comparing "enterprise software" of who knows what with a random PHP
boilerplate?

~~~
derision
> another is Stripe which is a SAAS boilerplate built on top of laravel

Spark _

------
cltsang
I wonder if there is something similar for NoSQL?

For me it's much harder to plan for NoSQL databases. It's relatively easy to
draw ER diagram for a relational database, as all in my mind are the problem
and data model. With NoSQL database however, I need to take into account how
the client(s) works at the same time.

~~~
martinald
Honestly, if you're finding it hard to plan that's an indication to me that
NoSQL isn't a good fit and you actually need relationships.

~~~
cltsang
Yes. Coming from a CS background, I'm accustomed to mapping problems to
relational data. Everything can be stored in an RDBMS.

However, I often work in a one man band, and need to push out production ready
system in weeks. In these cases, as a compromise, I choose a managed NoSQL
database as it requires less code and DevOps work to be up and running. It's
not ideal.

------
whitten
Are these diagrams generated from the Data Definition Langauge (DDL) of SQL or
some other descriptions/source ?

Are they showing Unified Modeling Language (UML) or Entity Relation Diagrams
(ERD) ? or something else that is new to DrawSQL ?

------
smrtinsert
The wordpress schema blows me away. < 20 tables to create an entire industry.

------
carapace
[https://drawsql.app/templates/hacker-
news](https://drawsql.app/templates/hacker-news)

Nice. Meta-nice.

~~~
emmanueloga_
[https://drawsql.app/templates/drawsql.app](https://drawsql.app/templates/drawsql.app)
would be "more meta" :-)

------
tango12
Looks slick! Congrats on launching :)

How would you compare this to [https://dbdiagram.io](https://dbdiagram.io)?

~~~
stronglikedan
Strictly comparing by price, I would think this is _much_ better/feature-rich
to justify the large difference. This is definitely pertier tho.

------
airstrike
Really great stuff. Would appreciate a "full-screen" mode so I can more easily
browse around the schema

~~~
dennisong
Great suggestion! (and an obvious oversight on my end). I've just added this
in today - thanks

~~~
airstrike
That was quick! Happy to contribute with feedback :) Thanks for adding and
congrats on an amazing product. Will definitely be using it in the future.

------
danielovichdk
Looking at this I miss programming right away.

Super cool

------
beckingz
Does this rely on foreign keys?

~~~
dennisong
If you imported the diagram from a SQL DDL script, then it does generate
relationships based on the foreign keys. I can then add the other missing
ones.

In the future there will be smarter ways to infer them, e.g. searching for
{table_name}_id etc. In fact I did use a crude script that did just that when
curating the diagrams for the gallery. Just need to build a nice frontend for
it.

