I'm looking for an alternative to PL/SQL. PL/SQL is mediocre at best but I haven't found anything that's even close to matching its productivity when writing Oracle database-centric scripts.
So, are there any other programming languages that offer any of the following features?
*Edit: I'm well aware of, and use, IDEs for SQL and PL/SQL that offer autocomplete. I'm merely wondering if there exists any other programming language out there that lets you intermingle SQL and code in a similar way to PL/SQL.
"Awkward exception handling, a lack of many built-in datatypes and functions that you take for granted in most languages, lack of anything resembling proper support for multi-threaded programming, inability to access the filesystem of the person running the script (SSH access to prod DB servers is often out of the question), hugely awkward for OOP, dealing with packages can be a PITA, doesn't respect role-base grants, etc... PL/SQL is awesome when it comes to integration with the DB, but beyond that it's a fairly poor language once you go past a certain level of complexity."
One by one.
Awkward exception handling
Awkwardness is in the eye of the beholder but I'll give you that one. Too much is left up to the individual developer.
a lack of many built-in datatypes ... that you take for granted in most languages
It has the same datatypes as SQL, plus BOOLEAN. What more can you want?
lack of anything resembling proper support for multi-threaded programming
Multithreading is a tricky concept to combine with read-consistency in a multi-user environment. The Aurora JVM doesn't support mult-threaded Java in Java Stored Procedures either. It's not a limitation of PL/SQL.
inability to access the filesystem of the person running the script
Again, that's not a PL/SQL issue. Ask your network administrator to map a fileshare on your PC to the network.
hugely awkward for OOP
Yeah well, OOP is on its way out, everybody's down with functional programming these days.
dealing with packages can be a PITA
Personal opinion. I love packages.
doesn't respect role-base grants
Again, that's not PL/SQL, it's the database security model. Views don't respect role-based grants either.
once you go past a certain level of complexity
Write it in Java and call if from a Java Stored Procedure. Or write it on C and call it from an extproc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With