Fairy Godmother’s Last Theorem, Resolved Via Oracle.

 

by Kevin Loney.

This article first appeared on the http://www.kevinloney.com web site. Be sure to visit http://www.lonyx.com, the free search engine for Oracle DBAs, developers, and IT managers.

Note: Those of you who come early to my talks early know there is usually an unrelated opening presentation. This article is based on one of those openings.

 

Mathematicians have recently laid out eight math puzzlers for the new century - riddles and theorems that remain unsolved. Among their list, however, there was no entry for the Bibbitybobbityboo Theorem. As first postulated by the Fairy Godmother in Disney’s "Cinderella", it asserts:

Salagadoola, Mishakaboola, Bibbitybobbityboo
Put them together and what have you got? Bibbitybobbityboo.

She states that the combination of Salagadoola and Mishakaboola and Bibbitybobbityboo gives Bibbitybobbityboo as its result. It is up to the reader to determine the functions and expressions required to make this equation correct, and to uncover the real-world relevance of the equation. And as DBAs and developers, it is up to us to see how Oracle can provide the answer to this long-standing concern.

Going beyond the simplistic cases where Salagadoola and Mishakaboola are both either zero or 1, this Theorem at first seems to imply

Mishakaboola = -Salagadoola

Thus, the Theorem becomes

Salagadoola - Salagadoola + Bibbitybobbityboo = Bibbitybobbityboo

but surely a puzzle that simple would not have held sway over the collective mathematical community since it was first postulated over a carriage-worthy pumpkin. Investigating the problem further, one finds that it could not even be properly solved with Oracle until the later versions of Oracle7! After much research, the case can finally be closed. For the full problem definition clearly states, in a later section of the same discourse:

The thingamabob that does the job is Bibbitybobbityboo.

It does a job! Bibbitybobbityboo can thus be a function or procedure, and Salagadoola and Mishakaboola must act on it in a way that returns Bibbitybobbityboo as the result. Let's consider the possibilities:

 

1. Salagadoola is a package, and Mishakaboola is a function within it that returns its input as its output. Thus:

select Salagadoola.Mishakaboola('Bibbitybobbityboo') from dual;

would return 'Bibbitybobbityboo'. However, this is a text string, not a done job.

 

2. Salagadoola is a function, undoing whatever the function Mishakaboola does, thus

select Salagadoola(Mishakaboola('Bibbitybobbityboo')) from dual;

would return 'Bibbitybobbityboo'. You could further nest this with Bibbitybobbityboo as a function:

select Salagadoola(Mishakaboola(Bibbitybobbityboo(‘job’))) from dual;

3. Salagadoola is a schema, Mishakaboola is a package, and Bibbitybobbityboo is a function or procedure. Put them together and what have you got? Bibbitybobbityboo.

This is the strongest of the cases thus far, since Bibbitybobbityboo, as the only function in this configuration, would be the only component capable of being the thingamabob that does the job. A variant on this theme would be for Bibbitybobbityboo to be a synonym for a Salagadoola.Mishakaboola package/function combination, but that’s not as strong a case. Additional cases can be made for Bibbitybobbityboo being a Java class, or a method associated with an abstract data type, or a trigger on a Mishakaboola table. With so many options, it’s not surprising that the Bibbitybobbityboo Theorem remained unsolved until now.

 

If Salagadoola is a schema, Mishakaboola is a package, and Bibbitybobbityboo is a function, then

Salagadoola.Mishakaboola.Bibbitybobbityboo(‘job’)

must do the job. Simply returning the string ‘job’ does not meet the stringent conditions specified in the problem definition – the thingamabob must do the job. But we already know that the RUN procedure of DBMS_JOB does the job. Therefore,

Salagadoola.Mishakaboola.Bibbitybobbityboo(‘job’) = DBMS_JOB.RUN(‘job’)

 

The Theorem can now be solved:

Salagadoola.Mishakaboola.Bibbitybobbityboo
Put them together and what have you got? DBMS_JOB.RUN.

It’s not quite as lyrical, but it works, and it even fits within the meter (D-B-M-S-JOB-DOT-RUN). Fermat would be proud.

 

The analysis of Chim-chim-aree Chim-chim-aree Chim-chim-charee is left as an exercise for the reader.