In short:
Java on top of PL / SQL
- PL / SQL is a procedural language, Java is an object oriented
- There are many more third-party libraries in Java.
- PL / SQL functionality is limited, even with all additional libraries
PL / SQL over Java
- It is much easier to develop small and simple programs.
- It has more natural designs for processing data directly in tables.
- It is sometimes difficult to deploy third-party Java libraries, even developed by Oracle and using the manuals from its official website (it can work in one version of the database, but not in others)
But in most cases, PL / SQL is the preferred way to develop stored procedures. If you cannot solve the problem using PL / SQL, then this is the reason for finding a solution outside the scope of the stored procedures. First of all, OracleDB is a database, and it allows you to maintain the logic inside it as a bonus, but it is not an application server ... Oracle has Java application servers, by the way.
But sometimes you need a stored procedure / function, and the only way is to use fully functional languages ββ/ environments with extended functionality. And Java is the easiest way in such cases (for Oracle), much easier than development in C / C ++.
source share