working database with hibernate