• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Agile database development and Hibernate

 
Glenn Murray
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My biggest headache with persistence is refactoring.
Does Hibernate in any way ease database refactoring
and versioning? Ambler has a whole book about this
("Agile Database Techniques") but doesn't say much
about Hibernate.

Cheers,
Glenn
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my point of view, the choice of persistence API doesn't really matter in terms of database refactoring. You're refactoring a database schema and you can do that regardless of how many layers the application has on top of JDBC.

Obviously database refactorings have some ripple effect in code as well, but then we're back in the "classic" refactoring landscape, i.e. plain Java classes (ok, and some configuration files).
 
Gavin King
author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, depending upon your situation, Hibernate can make it easier. Obviously, if you have a legacy schema, shared by many applications, then Hibernate can't help, since all applications must be considered. And your DBA should always be the one to upgrade the production database, via handwritten scripts!

However, if you are working on a new project, then at development time, you can let Hibernate auto-generate DDL scripts for you. This can definitely save time, if your schema is not yet really nailed down.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic