Isolated SQLite logic into its own DAO class.