Add database class and database function.