implement database class, and sqlite3_database class.