Using sqlite3 for event storage