Hacker News new | ask | show | jobs
by cneumuel 3434 days ago
There are several unit testing frameworks for PL/SQL. Code in the database encapsulates business logic, it gives you unified access from all clients. It can also be orders of magnitude faster. The presentation linked here

https://thehelsinkideclaration.blogspot.co.at/2016/09/noplsq...

proves that with flame graphs for a simple workload done from the app server vs. implemented in PL/SQL.

1 comments

The performance argument I can accept (I've done PL/SQL coding and administered Oracle clusters years ago). But when it comes down to it, PL/SQL can possibly only benefit from lower inter-process or JDBC driver overhead vs. Java, say. I've seen PL/SQL becoming a CPU bottleneck in large real-time migration projects.

To encapsulate business logic using PL/SQL, however, is crazy IMHO. Rather than coding your business logic in a mainstream language (with incomparably better staffing and tooling), you now have it in a proprietary niche language with awkward or even non-existent debugging.

Also, the relational model is (or should be) the unified access at this level IMHO, rather than some ad-hoc data access layer.