You may have seen that REALsoftware offers a database server. And last year they added a plug-in SDK for this server.
Today I toke a deep look on the SDK and I can say you it looks promising. As it is a very young SDK, you won't find anything about it on the internet and there is nearly nothing included on documentation. But you can help yourself with SQLite documentation as a lot of things are equal for running sqlite locally or using REAL server.
If you have ideas what a REAL server Plugin I could write, please email me. But be aware that you can't use GUI functions in the plugin.