News for hackers. Stuff that matters.
Re:RethinkDB versus PostgreSQL: my personal experience by dwaltrip on Thursday February 09, 2017 @11:22PM (#13613196)
Isn't it harder to create well designed abstractions for business logic in SQL compared to a full-fledged backend application server?

I know SQL has stored procedures and the like, but is it correct that SQL is limited in how it can express domain logic, compared to languages that backend application servers are generally written in?

Re:RethinkDB versus PostgreSQL: my personal experience by ruslan_talpa on Friday February 10, 2017 @03:10AM (#13613945)
The point i was making was more in the direction of logic in the database, not specifically in pure SQL, it can be PgSql, Python ... does not matter. For the tasks that database side code should be used for (data consistency/access rights/reports on data) i would say they can express the domain logic for those tasks quite nicely, even better then in other languages. For example i can say "grant select on invoices to accountant" or i can add a constraint on a table like "CHECK (price > discounted_price)" or "CHECK (price > 0)". I do that in one place and i no longer have to worry about checking this (simple example of) domain logic anywhere else.

Most of the time this is what people call domain logic (consistency/access/reports) although i would think a better name for it would be "data logic", heard that somewhere and in a lot of the cases this is almost everything the application does

Re:RethinkDB versus PostgreSQL: my personal experience by masklinn on Friday February 10, 2017 @05:59AM (#13614544)
> I know SQL has stored procedures and the like, but is it correct that SQL is limited in how it can express domain logic, compared to languages that backend application servers are generally written in?

Procedural extensions aren't, really. I mean you can literally just use Python (pg/python) or Javascript (plv8) to write postgres functions.