Database integration with hibernate