SQLite local database implementation