Tuesday, June 12, 2007

Agile Database Refactoring with Hibernate

clipped from www.onjava.com


Agile Database Refactoring with Hibernate

In this article, we will show readers how to upgrade their faulty schemas and data models without affecting existing applications or processes. By using the latest technology from Hibernate (version 3.0 and up)--along with a combination of database views, stored procedures, and standard design patterns--application developers and data architects can repair a faulty data model, one piece at a time.

  • Dream up an improved data model: Agree on what's wrong with the current model and how you could fix it
  • Develop database views: Based on the current (faulty) model, these views reflect how you would like your data model to be
  • Develop stored procedures or "instead of" triggers: These will replace a standard table insert
  • Develop POJOs, Hibernate mappings, and DAOs: Represent your new data model and tie it to your views
  • Test, test, test: Prove your data model right
  • 0 comments: