This is how Readup is built! Whether or not it's a good idea to put logic, especially "business" logic, in the database is a controversial subject among programmers. After almost a decade of experience writing (and importantly: supporting) web applications using ORMs that abstract away database access I've come around to instead fully embracing SQL (PostgreSQL specifically). The talk given by Rich Hickey is life changing.
This is how Readup is built! Whether or not it's a good idea to put logic, especially "business" logic, in the database is a controversial subject among programmers. After almost a decade of experience writing (and importantly: supporting) web applications using ORMs that abstract away database access I've come around to instead fully embracing SQL (PostgreSQL specifically). The talk given by Rich Hickey is life changing.