Re:SQLer – Turn Your SQL queries into RESTful APIs without a...
by michelpp on Wednesday January 09, 2019 @11:42AM
(#18866148)
Views are the abstraction layer:
https://www.postgresql.org/docs/current/tutorial-views.html
Your application layer "security system" is just row level security done outside the db.
Another problem is the SQL flavor implemented by RDBMs. Every major RBDMs has their own distinct flavor of SQL. So forcing everyone else to learn a specific flavor of SQL is going to be a hassle. Especially if the RDBMs was changed.
But the biggest issue is security and performance ( especially true for sensitive data ).
APIs are there to make things secure, user friendly, consistent and of course robust in the face of back-end changes. I doubt most companies or people would allow direct access to their DBs. If people wanted to run queries on their dataset, they might let you download the dataset and run the queries locally.