Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

  (email not shown publicly)

Journal of Alias (5735)

Tuesday January 08, 2008
07:27 PM

Taking a fresh look at Oracle PL/SQL

[ #35335 ]

I have to admit that I've never taken a serious look at Oracle PL/SQL, despite working with Oracle at both the "large corporate" employers I've worked at.

Instinctively, I found the idea of a custom proprietary mini-language repulsive.

Skills in humans have about the same economic value as software in companies, unless they are being used they have practically zero tangible value.

But at my current work, I've been forced to adapt to the scenario where the database schema is too big to be reproduced from scratch, and there's too much code talking to the database to be able to reliable understand it all and safely make deep modifications to functionality purely at a Perl/application level.

The result is a compelling need to push functionality into the database, in particular declarative/Aspect type functionality of the "Whenever a row is inserted here, update this value over there" variety.

So the time has come that it's now necessary to sit down and learn Oracle PL/SQL.

Although PL/SQL is most certainly good for the resume, I was quite depressed about this situation, because I really don't want to learn some stupid proprietary language.

HOWEVER, all this changed for me when I read the first paragraph of the introduction in the O'Reilly Oracle PL/SQL book.

"Oracle PL/SQL is a high level language derived from Ada..."

Wait a second, what's this?

Ada as in designed-by-military-specification, best-language-for-life-critical-systems, used-in-nuclear-weapons Ada?

How is it that I've managed to go 10 years in the IT industry and NOT find this out...

Because this makes things FAR more interesting.

All of a sudden there's a much better chance that.

1. Oracle PL/SQL won't suck at a fundamental level, just have an ugly syntax.

2. Some of these skills might actually be recoverable in other situations.

Indeed, it appears that in the past Oracle actually did fork Ada as the starting point for their embedded language (although it's since diverged a bit more and they don't use a real Ada compiler internally)

And just as interesting, it appears that VHDL (the language used to design hardware) is also Ada-derived.

And since my primary driver for learning new languages is that they can do something that no other language I know can handle, this makes Oracle PL/SQL even more interesting, as a useful starting point into a family of languages that ALL can do things that none of my current languages support well.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • PL/SQL is also implemented (with small differences) in Postgres. Of course you knew that.

    And of course you can use a lot of different languages server-side in Postgres, including Perl :-)

    But I have the feeling that PL/pgSQL is better integrated with the server. I have no performance numbers, so I could be totally wrong here.
    • I'm quite sure it's better integrated into the server.

      Personally, if I'm going to be writing code inside the server, I want it as integrated as possible.
  • I'm a reluctant lover of PL/SQL. I have an orange O'Reilly Oracle shelf sitting in front of me that's about two and a half feet wide. At one time, I'd read about a third of these all the way through and had plans to finish the rest, but then I needed less Oracle, and now in my new job I currently don't need it at all. (But with this prominent shelf, when we do need Oracle, they'll know which employee to go to. :) )

    I felt a deep, visceral agreement when you said "Instinctively, I found the idea of a cus

    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • My original database experience order was MySQL -> Oracle -> Postgres.

      Once I discovered Oracle, I realised how dodgy MySQL truly was, and Postgres for me has always been a less corporatey, less thorough, but slightly more sane version of Oracle.

      I do like that you can relatively cleanly mix SQL syntax with the Ada-like coding in Oracle PL/SQL. The parsing implications (how complex their parser must be to deal with it) are amazing.

      I see where Microsoft copied their idea from for doing the same in C#.

  • Thanks for this post...I wasn't aware of the connection between the two languages, and knowing this makes both languages more interesting.