Agile Data

Catalog of Data Quality Database Refactorings

www.agiledata.org: Techniques for Successful Evolutionary/Agile Database Development

Scott W. Ambler
   Home  |  Agile DBAs  |  Developers  |  Enterprise Architects  |  Enterprise Administrators  |  Best Practices  |  Agility@Scale Blog  |  Contact Me 
Refactoring Databases A data quality database refactoring is a change which improves and/or ensures the consistency and usage of the values stored within the database so as to improve your database design without changing its semantics.  

 

Refactoring Example
Add Lookup Table Create a lookup table for an existing column.
Apply Standard Codes Apply a standard set of code values to a single column to ensure that it conforms to the values of similar columns stored elsewhere in the database.
Apply Standard Type Ensure that the data type of a column is consistent with the data type of other similar columns within the database.
Consolidate Key Strategy Choose a single key strategy for an entity and apply it consistently throughout your database.
Drop Column Constraint Remove a column constraint from an existing table.
Drop Default Value Remove the default value that is provided by a database from an existing table column.
Drop Non-Nullable Constraint Change an existing non nullable column such that it accepts null values.
Introduce Column Constraint Introduce a column constraint in an existing table.
Introduce Common Format Apply a consistent format to all the data values in an existing table column.
Introduce Default Value Let the database provide a default value for an existing table column.
Make Column Non-Nullable Change an existing column such that it does not accept any null values.
Move Data Move the data contained within a table, either all or a subset of its columns, to another existing table.
Replace Type Code With Property Flags Replace a code column with individual property flags, usually implemented as Boolean columns, within the same table column.

 

 

Recommended Books

Refactoring Databases

This book describes, in detail, how to refactor a database schema to improve its design. The first section of the book overviews the fundamentals evolutionary database techniques in general and of database refactoring in detail.  More importantly it presents strategies for implementing and deploying database refactorings, in the context of both "simple" single application databases and in "complex" multi-application databases.  The second section, the majority of the book, is a database refactoring reference catalog.  It describes over 60 database refactorings, presenting data models overviewing each refactoring and the code to implement it.

 

Working Effectively With Legacy Code Working Effectively With Legacy Code describes techniques for refactoring and testing existing, legacy code.  Few teams have the luxury of building everything from scratch, instead they must work from an existing base of code, or minimally integrate with other legacy systems.  In this book Michael Feathers covers the fundamental techniques which agile developers need to effectively work in these sorts of environments.  You don’t need to stop all development and rework your legacy code, instead you can ease into it over time, and this book shows you how to do that successfully. 

 

References and Suggested Online Readings

Agile Database Techniques This book describes the philosophies and skills required for developers and database administrators to work together effectively on project teams following evolutionary software processes such as Extreme Programming (XP), the Rational Unified Process (RUP), the Agile Unified Process (AUP), Feature Driven Development (FDD), Dynamic System Development Method (DSDM), or The Enterprise Unified Process (EUP).  In March 2004 it won a Jolt Productivity award.
The Object Primer 3rd Edition: Agile Model Driven Development (AMDD) with UML 2 This book presents a full-lifecycle, agile model driven development (AMDD) approach to software development.  It is one of the few books which covers both object-oriented and data-oriented development in a comprehensive and coherent manner.  Techniques the book covers include Agile Modeling (AM), Full Lifecycle Object-Oriented Testing (FLOOT), over 30 modeling techniques, agile database techniques, refactoring, and test driven development (TDD).  If you want to gain the skills required to build mission-critical applications in an agile manner, this is the book for you.
 

Let Me Help

I actively work with clients around the world to improve their information technology (IT) practices as both a mentor/coach and trainer.  A full description of what I do, and how to contact me, can be found here

 


Copyright © 2002-2009 Scott W. Ambler

This site owned by Ambysoft Inc.
Agile Modeling (AM)  |  Agile Unified Process (AUP)  |  Enterprise Unified Process (EUP)  |  Disciplined Agile Delivery (DAD)  |  My Writings   |  IT Surveys  

Follow Scott W. Ambler on Twitter