Tilly, do you know of any implementation of this using a database? I'm sure I could manage to move things around so that I could use it with Postgresql, but if that's already been done, why reinvent the wheel. I've dug around and have not found such an example, though.
Just taking my chances and asking. Never know . . . :)