Implementing the database.