Fleshed out SQLite persistence