Some sqlite3 code; incomplete