A collection of PlantUML styles.
For starters, I've wanted a good database schema diagramming tool for a while. I recently stumbled across these two wonderful usages of PlantUML:
Simply add these two lines near the top of of your PlantUML file:
!include https://raw.githubusercontent.com/jonathar/plantuml_styles/main/DB_Schema.puml
LAYOUT_WITH_LEGEND()
Then define the schema thusly (see the samples/relational_db_scheam.puml for relations):
Table(user, "user\n(User in our system)") {
pk(id) INTEGER
not_null(unique(username)) VARCHAR[32]
not_null(password) VARCHAR[64]
constraints_header()
unique_constraint(uc_user (id, username))
}