subzerocloud / postgrest-starter-kit

Starter Kit and tooling for authoring REST API backends with PostgREST
MIT License
744 stars 71 forks source link

Documented database DDL statements and ordering #52

Open dvasdekis opened 5 years ago

dvasdekis commented 5 years ago

Using this kit, I found it initially difficult to understand what all these DDL and schemas did, given the sequential nested hierarchy. This doco hopefully makes it easier for whoever comes after me.

ruslantalpa commented 5 years ago

thank you for this PR, I am on the fence with it for the following reasons (though I agree anything is better than nothing):

My question is: When you had trouble understanding what's going one (and what each file/dir in here is about) is it because you did not find the following documentation (https://docs.subzero.cloud/architecture-and-project-structure/#postgresql-db and https://github.com/subzerocloud/postgrest-starter-kit#directory-layout) or was it not enough?

Thank you

dvasdekis commented 5 years ago

Good questions! Thanks for considering the PR.

I did find that documentation and it was useful, but as a DBA, I start every project by understanding the code running in my database before adding to it. In Postgrest, with the database as the "source of all truths", I think it's doubly important to understand what functions, tables, permissions etc. exist and why, especially when building a project that might have a public-facing API URL.

I know that it's "my understanding" of what's going on, but I'm happy to amend this with your "developer truths" if you'd like to provide them. :)