Appendix A. Database Refactoring Catalog
This appendix summarizes the database refactorings that I have discovered over the years as well as some refactorings identified by others (Sadalage 2003). It is important to have a catalog of refactorings such as this to provide a common language that agile DBAs and application developers can use when working together to evolve database schemas. I maintain an updated list of database refactorings at www.agiledata.org/essays/databaseRefactoringCatalog.html
that includes all of the ones described here. Please feel free to provide suggestions for new ones that you run across.
Table A.1 presents a catalog of common database refactorings. For the sake of simplicity, I will use the following terms in Table A.1:
Application refers to anything that is coupled to your database schema, such as another database, system, data extract, and so on.
Deprecate, as in deprecate the column, implies that the item in question has been targeted for removal (a removal date is negotiated, documented, and communicated to interested parties) and will be removed on or after the agreed upon time.
Develop, as in develop a stored procedure, infers that the stored procedure is designed, written, tested, and deployed appropriately.
Method refers to a stored procedure, trigger, or object operation (such as a Java operation) within the database.
Table A.1. Summary of Common Database Refactorings
NAME | CATEGORY | MOTIVATION | MECHANICS | EXAMPLE |
---|---|---|---|---|
Apply Standard Codes | Data Quality | Different columns ... |
Get Agile Database Techniques: Effective Strategies for the Agile Software Developer now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.