Have you considered sqlite3? It's a SQL engine, but the backend is just a
file. So it doesn't support concurrent access by multiple users, but if
that's not a concern, it gives you the ability to do real SQL queries
without the bother of setting up an RDBMS.
Adam