Hacker News new | ask | show | jobs
How do you document your mysql database tables and fields
2 points by bee 5737 days ago
I was wondering how do you create documentation about a mysql database tables and fields (when building a database). Do you use any software? Or?
3 comments

There's two ways I create database tables:

- either I create them through an ORM, in which case I don't document the database tables or fields, I document the object instead.

- or I create it "by hand", in which case I use the standard comments to document the tables and the fields in my schema file

There are tools that can reverse-engineer tables (and relations). For example, Visio can do it for SQL Server databases.
SQL is pretty much self-documenting. But I still use hand-drawn diagrams showing how fields are related.