Using SQLite to store messages