Close

Let’s get started!

Welcome to my blog about Oracle database development. I’m also interested in math and frequently write pl/sql and sql snippets to solve various math problems.

For example, here’s an article I wrote about solving a combinatorics problem found in dart games like 301,501,701, etc.

Fun with Oracle SQL – Solving Checkouts in a Game of 501 Darts – Oracle, SQL, Darts, Combinatorics

That article used a purely SQL solution,  I also ported the Mersenne Twister pseudo-random number generator algorithm to pl/sql.  Tackling that was both fun and frustrating.  Fun because it was an interesting task both mathematically and programmatically.  It was frustrating at the same time though because much of the algorithm is based on pointer manipulation which doesn’t exist within the context of pl/sql, so I had to fake it procedural get/set operations.  The final solution I came up successfully mimics all of the functionality of the original SIMD oriented Fast Mersenne Twister(SFMT) by Mutsuo Saito and Makoto Matsumoto.  In addition I allowed parameterization of the mersenne exponent which the original c version only supported by recompiling.  However, the pl/sql implementation is much slower than the original c (even with native compilation.)  I implemented the pl/sql port largely for academic interest, not as a production-ready solution.  However it does work and for small scale testing the performance may be adequate.

I hope those articles give a good example of the type of code you might find here and whet your appetite for more.