* Implements writing information to database.