Updating database and database output functions.