Refactoring Databases Evolutionary Database Design


Summary:

 

This book proposes using small, evolutionary changes to achieve database optimization through agile processes.  The book is formatting a little like a cookbook, with recipes for achieving better database design.  Many patterns presented also present the associated anti-pattern, leaving the reader to decide which benefits of a particular approach are suited for their needs.

 

Discussion of this particular type of refactor is on page 257 under the "Migrate Method from Database" pattern.  Reasons for performing this pattern include:

Reasons to NOT implement the pattern:

 

The discussion focuses on the overall benefits to the approach, but doesn't go into much detail on the nuances of such an approach, just the pros and cons of doing it. 

 

Extending the Approach:

 

source:

Ambler SW, Sadalage PJ (2006) Refactoring databases: Evolutionary database design. Addison Wesley, MA

 

relevant content:

 

page 257

Migrate Method from Database

Motivation:

1) Supports variability (e.g. application requirements begin to vary over time, in a way that multiple callers might use their own logic, this type of refactor allows for easier migration to varying use cases)

2) increased portability (reduced dependence on a particular rdbms)

3) increases scalability via the use of multiple application servers

4) increased maintainability.  Java and C#, etc, have good tool support for writing reusable, effective code.

 

Tradeoffs:

1) possible issues with performance degradation due to latency.