Catalog of Database Refactorings: Home Page (original) (raw)

by Scott W. Ambler

A database refactoring is a small change to your database schema which improves its design without changing its semantics. There are several categories of database refactorings:

Category Database Refactorings
Structural Refactorings Drop Column Drop Table Drop View Introduce Calculated Column Introduce Surrogate Key Merge Columns Merge Tables Move Column Rename Column Rename Table Rename View Replace LOB With Table Replace Column Replace One-to-Many With Associative Table Replace Surrogate Key with Natural Key Split Column Split Table
Referential Integrity Refactorings Add Foreign Key Constraint Add Trigger for Calculated Column Drop Foreign Key Constraint Introduce Cascading Delete Introduce Hard Delete Introduce Soft Delete Introduce Trigger for History
Architectural Refactorings Add CRUD Methods Add Mirror Table Add Read Method Encapsulate Table With View Introduce Calculation Method Introduce Index Introduce Read Only Table Migrate Method From Database Migrate Method to Database Replace Method(s) With View Replace View With Method(s) Use Official Data Source
Method Refactorings Add Parameter Consolidate Conditional Expression Decompose Conditional Extract Method Introduce Variable Parameterize Methods Remove Control Flag Remove Middleman Remove Parameter Rename Method Reorder Parameters Replace Literal With Table Lookup Replace Nested Expression With Guard Clauses Replace Parameter With Specific Methods Split Temporary Variable Substitute Algorithm
Non-Refactoring Transformations Insert Data Introduce New Column Introduce New Table Introduce View Update Data

Database Refactorings
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.

Choose Your WoW! 2nd Edition
This book, Choose Your WoW! A Disciplined Agile Approach to Optimizing Your Way of Working (WoW) – Second Edition, is an indispensable guide for agile coaches and practitioners. It overviews key aspects of the Disciplined Agile® (DA™) tool kit. Hundreds of organizations around the world have already benefited from DA, which is the only comprehensive tool kit available for guidance on building high-performance agile teams and optimizing your WoW. As a hybrid of the leading agile, lean, and traditional approaches, DA provides hundreds of strategies to help you make better decisions within your agile teams, balancing self-organization with the realities and constraints of your unique enterprise context.

I also maintain an agile database books page which overviews many books you will find interesting.