Wednesday, Oct 04, 2023
One of the stickiest, most durable technologies is the database.
Django: declarative, commented schema
I've been thinking about databases from the perspective of what to use for my next web app projects and started thinking about database management and specifically why I miss Django when I use Rust for web apps.
I think the biggest thing is that Django automatically provides you with a declarative, annotated schema for your database. There's a source of truth for the database and it's the django class modules.
Each model class and each column property can have comment text associated with it that will give guidance to the user.
But the truth is that Django isn't optimized to make a schema easy to explore and understand.
So I'm interested in exploring creating a tool that is optimized exactly for that.
The Postgres information_schema schema
It looks like you can get a wealth of information about tables and columns from a utility table in postgres called information_schema.columns
.
Actually that schema as a whole has a bunch of nice things worth exploring.
select * from information_schema.columns;