One of the key things you need to do in good database design is to map business verbs to API endpoints in something like a 1-1 way. Having an api endpoint that is essentially "insert this row to the database" is just cargo culting. There is already an API for that, it's called SQL.
Postgrahile is the best of both worlds, providing a nice GraphQL interface on top of your database.
If you decide you need to write crud endpoints, you have your database still. It's a zero-cost abstraction, which is wild.
There is a lot of context lost in generalities so I admit you have to look at every specific situation, but in general CRUD means pushing business logic down to the client (which is generally some kind of code running in a browser or mobile app), which is the opposite of everything good in the world.
Postgrahile allows you to rename/disable api endpoints if needed.
Postgraphile rocks. And it's written in modualar Javascript, so I can hack it if I need to. Unlike Hasura.
It's a great idea, and my clients and bank account agree with me.
There are lots of ways to do software. Some are widely considered by experts to be good, some are not so good.
Then there is a thing called business. You can certainly sell software that is built using bad practices, and honestly nobody will probably complain so long as it works. It might not be quite as maintainable, it might require more effort to add features, and it might be necessary to completely rewrite that software in 5 years when other parts of the system change.
Terrible software is bought all the time, and that's not even really a problem.
Even though you sold it and your customers are happy, there still are things you can probably learn, right?
This mapped very awkwardly to digital subscribers who we had individual data on. We were able to join databases in a way that sort of works through more or less (mostly less) comfortable assumptions. The queries are not pretty.
Hilariously, it has dozens of names, because it just comes up in so many places for so many people. It appears that "record linkage" is the term that has won the top spot at Wikipedia: https://en.wikipedia.org/wiki/Record_linkage
Record linkage seems to be concerned with joins that aren't guaranteed to be correct because there are no unique keys.
I'm interested in PostGraphile, but i have a question: How do apply permissions when your user table is different from postgres user systems? i only have handful of users that have permissions spaning a lot of tables.
Do i need to create one postgres user for each of my application users?
1. Dividing up tables so that one user can have more than one email address
2. Using PostgreSQL’s “row-level security” system to restrict database results based on the logged in user
3. Dividing tables across multiple schemas for additional security
4. SQL comments for documentation
5. SQL functions for common functionality, such as logging in or verifying an email
It’s a fascinating project, and well worth a look!
[1](https://www.graphile.org/postgraphile/)
[2](https://github.com/graphile/starter)
[3](https://github.com/graphile/starter/blob/master/%40app/db/mi...)