view counter

PL/SQL Feed

Oracle PL/SQL (Procedural Language/Structured Query Language) resources, news, and support articles.

Translating Relational Lattice Expressions into Predicate Calculus

Relational Lattice is simplified “attribute-free” Relational Algebra. It allows to automatize Relational Algebra in the same spirit as Relation Algebra. Here is axiom system by Litak&Hidders&Mikulas:

x ^ y = y ^ x.
(x ^ y) ^ z = x ^ (y ^ z).
x ^ (x v y) = x.
x v y = y v x.
(x v y) v z = x v (y v z).
x v (x ^ y) = x.

In Defense of Joins

Joins appear (to me) to be getting a lot of bad press recently. In discussions I’ve had and articles I’ve read many give the position that joins are somehow inherently bad and to be avoided at all costs.
I’ve never been entirely convinced by the “joins are bad” arguments however. Partly because there’s few concrete cases actually demonstrating the (additional) cost of joins. Instead discussions tend to be hand-wavy arguments around extra CPU cycles used or something to that effect.

I (re) Join Oracle Corporation!

On March 17, 2014, I became an employee of Oracle Corporation for the second time. My first round with Oracle started in August 1987. My second son, Eli, was less than a year old. I'd been incredibly bored with my consulting gig, which consisted of babysitting a reporting system on a DEC10 "mainframe", based on a flat-file database – but a database.

So I checked the Help Wanted pages (no Internet, no smartphones, no LinkedIn) and came across an ad from Oracle Corporation. It contained the word "database", so I figured: "Why ?"

Quiz: What’s wrong with this update?

The following update forms the basis of a DIY connection pool. It is intended to allocate an unused session to whoever requests it:

Overlapping ranges with priority

A few years ago, Alberto Dell’Era blogged about product prices with overlapping date ranges; “on an overlapping range, the strongest priority (lower number) wins.” His analysis, explanation and solution are all excellent. I’m revisiting the subject to suggest a few improvements (and mention MATCH_RECOGNIZE yet again). To explain more easily, Alberto uses letters (a,b,c,d,e) instead […]

Idea for a new type of quiz: Countdown PL/SQL

Always looking for ways to increase the entertainment value of the site, I came up with this idea last night.

Countdown PL/SQL


You have thirty seconds to answer ten true-false questions. 

With the clock on the page counting down, you are shown a statement about PL/SQL and you must quickly decide: true or false.

Of course, the same could be done with SQL, APEX, etc.

Oracle 12c Multitenant workshop – Bangalore chapter

Thanks to all folks who attended Oracle 12c Multitenant workshop in Bangalore. It was really a great session and well received by all the participants. I appreciate all your interests to know about Multitenant, play with the new architecture and explore the changes. Few points to make note from this event – 1.

SQL Brainteasers: Guess the Film Part 10

Back on the films today, here’s another six to get:

Hidden DBMS_JAVA Nuance

It always happens when I’m in a hurry. Yes, I ran into one of those pesky little features with Oracle’s DBMS_JAVA package. While I try to write entries with proper GeSHi case semantics, like everyone else I tend to write PL/SQL initially in lowercase. That led me to the discovery of this wonderful error message:

When v$sesstat statistics are updated

Craig Shallahamer wrote excellent article “When is v$sesstat really updated?”.
And my today post just a little addition and correction about the difference of updating ‘Db time’ and ‘CPU used by this session’ statistics.

view counter