4 ms·
If your database contains objects like "customer ID", "address" and the like, you already have business considerations (if not logic) inside it. In fact, busine
by pnako 7y ago
If your database contains objects like "customer ID", "address" and the like, you already have business considerations (if not logic) inside it. In fact, businesses using databases for business stuff is probably 95% of DB use cases.
If it's something that's not application-specific and fits nicely into the query language (like in the example given) it makes sense to have it inside the DB, because for queries involving sorting, limiting, etc. you can do all that stuff inside the DB and return the few values that interest you, instead of transferring all the data and having to write code to do that inside your app.
- eternalban 7y agoArguably, a robust RDBMS with user defined functions (such as PostgreSQL) are the ideal place for core domain semantics. What is missing is a modern tool chain that addresses the painpoints of such a development model.