Write to a sqlite3 database file.