Set up database and added database access classes with hibernate.