Jach's personal blog

(Largely containing a mind-dump to myselves: past, present, and future)
Current favorite quote: "Supposedly smart people are weirdly ignorant of Bayes' Rule." William B Vogt, 2010

Let's build a database!

As I may or may not have mentioned, I work with LucidDB in my day-job. It's pretty awesome, and I've learned a lot, though the underpinnings of the database architecture itself are still fairly mysterious to me. I would wager there are some low-hanging fruits in the C++-based Fennel core that could result in significant speedups of certain queries, but it's a complicated code base that it's confusing where to begin.

So! In order to better my own understanding of databases in general, I'm going to build a Persistent Almost-Relational Object Database sYstem. If you're intimately familiar with database literature, perhaps you recognize the PARODY acronym from the book C++ Database Development. Indeed, I recently bought the 1994 book for $4 (with free shipping) off Amazon. It even came with a floppy disk!

The book grants liberal usage of the code, so long as it's not republished somewhere. Since I'm going to use Python instead of C++, I can avoid this restriction. (Also, I like Python way more, and since this is going to be more of a toy database I don't think the performance penalties of Python really matter.) You can follow my progress on my GitHub account's project page (I'm calling it PARODPY), and I'll occasionally blog about my progress, explaining things (largely to myself, as this is foremost an educational experience) in a similar manner to the book. For particularly interesting bits of C++ code I may show a comparison to the Python, and I'll be relying on fair use laws and the fact that it's from 1994 to protect me from any evil thoughts the author may have about his work being discussed. :)

Things this book (and hence the project) lacks

This is not a SQL database. It's at best a half-baked NoSQL database that shouldn't be fit for any real purpose; go use Postgres or LucidDB! This is also not a relational database, it's an object database. This will not have record and file locking, so there will be no multiple user support, multitasking, or concurrency. (Though I suspect if I really wanted to Python with its coroutine magic would enable me to do add rudimentary versions of those, I will update this if I ever do.)

This will also make no further reference to CompuServe (which the author recommends as the place to get help). I wish I was around in 1994 in a capacity more aware than a typical 4-year-old.

Posted on 2011-03-25 by Jach

Tags: databases, PARODPY, programming, python


Trackback URL:

Back to the top

Back to the first comment

Comment using the form below

(Only if you want to be notified of further responses, never displayed.)

Your Comment:

LaTeX allowed in comments, use $$\$\$...\$\$$$ to wrap inline and $$[math]...[/math]$$ to wrap blocks.