Refactoring Databases: Evolutionary Database Design (Addison-Wesley Signature Series (Fowler))
E**S
A very complete catalog of strategies for database maintenance
As I had never thought about data model maintenance in terms of "Refactoring", the title of this book was very appealing to me. Creating a data model from scratch on a development environment is a relatively easy thing to manage; updating an existing one on a production environment with a lot of dependencies, is certainly not.Like accomplished taxonomists, Scott Ambler and Pramod Sadalage elaborated an exhaustive catalog where they identified, named, and classified most (if not all) of the transformations that can be applied, not only to the database itself (e.g. Drop Column, Rename View, Split Table) but also to the data (e.g. Apply Standard Codes, Introduce Default Value, Introduce Common Format) and to the methods (e.g. Add Parameter, Rename Method, Remove Middle Man).Each transformation is clearly explained together with a suggested strategy for rolling-it out into production. References on the inside cover serve as an index to easily locate each particular refactoring and transformation.This book should certainly be on the bookshelf of any person responsible for maintaining a database.
P**.
Some important ideas but much work remains to be done
In software development a 'refactoring' is a change that improves code quality without changing functionality. Refactoring helps keep an application maintainable over its life-cycle as requirements evolve, and is particularly of interest to those adopting modern 'agile' methodologies. This book comprises five general chapters on database refactoring - about 70 pages - followed by a 200 page catalog of various refactorings. The refactorings are classified as 'structural', 'data quality', 'referential integrity', 'architectural' and 'methods'. An additional chapter catalogs 'transformations', more on which in a moment. Each catalog entry uses a template including 'Motivation', 'Tradeoffs', 'Schema Update Mechanics', 'Data-Migration Mechanics' and 'Access Program Update Mechanics'. The 'Mechanics' sections include example code fragments for Oracle, JDBC and Hibernate.Several of the structural refactorings are just simple database schema changes: rename/drop column/table/view. Adding is not really a refactoring so add column/table/view were cataloged as 'transformations' - changes that do affect the application, a distinction that appears to me a little clumsy. Some structural refactorings are more interesting: merge/split columns/tables, move column, introduce/remove surrogate key, introduce calculated column, introduce associative table.The data quality refactorings include introduce/drop default values, null or check constraints, standardize codes, formats and data types, use consistent keys and lookup tables. Most of these are common best practices, seeing them cataloged as refactorings didn't yield me any new insights. Only replacing type codes with flags was of special interest.Referential integrity refactorings include the obvious add/drop foreign keys with optional cascading delete, but also using triggers to create a change history and hard vs. soft deletes. Using before and after delete triggers to implement soft deletes is probably the best example in the book.Architectural refactorings include using CRUD methods (ie. stored procedures or functions to select/insert/update/delete records), query functions that return cursor refs, interchanging methods and views, implementing methods in stored procedures, using materialized views and using local mirror tables vs. remote 'official' data sources. All these are common design techniques and the discussion of motivation and tradeoffs is particularly relevant.The final section on method refactorings is more abbreviated and covers typical code refactorings. These qualify for inclusion only because databases include stored procedures, but they have nothing to do with schema evolution.An important aspect of this book is that the catalog of refactorings is presented in the context of evolutionary database development described in the first five chapters: this approach emphasises an iterative approach, automated regression testing, configuration control of schema objects and easy availability of personalized application database environments for developers. Refactorings and transformations are intended to be applied one by one, and an automated regression test suite used to maintain confidence that a change does not introduce an application defect. Change control and a change tracking mechanism are essential to manage the application of schema changes to integration, QA and production environments.What do I like about this book? The catalog of refactorings is thorough (some might say pedantic) which makes it a good learning tool for new database developers and DBAs, and as a shared reference for communicating on larger projects and in larger organizations. Experienced DBAs working on smaller projects are less likely to find it useful.What don't I like? Relatively little is provided about the tools required to make regular refactoring practical, the authors simply state that these are being worked on. utPLSQL is not mentioned at all. The discussion on tracking changes is thin (but check out the LiquiBase project on Sourceforge). No guidance is provided on how you might use Ant to build and maintain developer database environments. Little is covered on the tough topic of building and maintaining test data sets. A final pet peeve: no discussion of refactoring across multiple schemas shared by an application suite.In summary this book sketches out some important ideas but much work remains to be done. The catalog takes a number of established techniques and best practices and places them in a new framework which at least provides value to some for now.
A**A
Database Designer? Buy This Book
There are so few good books out there on database design, and even fewer on improving the design of existing databases. Loved the format of this book and the thought that went into it. Original thought-provoking ideas. I work as a database designer, and I love this book. I've used it several times when I need to back up an argument with management, and it's worked like a charm.
B**S
Totally Worthless
This book is just basic common sense. If my work didn't pay for it I would be furious. Nothing in here that a seasoned developer doesn't know and if you are new to the field just ask someone more senior your questions. They will be more helpful/knowledgeable by far.
K**R
Interesting look at how can make evolve your database with ...
Interesting look at how can make evolve your database with changes over time. However the techniques and patterns seem to be suites for large organizations that can schedule changes across years and manage future work
A**R
Fast shipping
Great product, great value, and fast shipping.
D**O
Outdated.
So, more like a FAQ that could be posted online.
A**O
Good content, poor editing and typesetting
This book tries to take the concepts of refactoring and apply them to databases. The book reads like a catalog of techniques and their opposites. Reasoning and examples are provided for both. A lot of these techniques are geared towards manual database maintenance.The physical print edition had a lot of pet peeves in the way it was done. There are a lot of pages where sentences or code sequences cutoff from one page to another. Readability could have been massively improved if they tried to keep code blocks on a single page and cut sentences or even paragraphs off more coherently.
P**Z
Recomendable
Un libro que debería tener en el anaquel como referencia base para tener a la mano las técnicas que proporciona
D**R
Content good, but overpriced paperback
The AW Signature series stands for great content and production, but what you get for your money now is a shame. A paperback book for 45 Euros, that looks like copied on your home copy-machine, lacking toner.
C**S
Very basic stuff
Good book for DBA beginners. "Patterns" are just very basic common operations for experienced DBAs. I was looking for some radically new stuff regarding nowadays database challenges but I did not found nothing new here.
T**A
Excellent job, well done!
It was a real pleasure to receive your product on time, in excellent conditions, so that I'll be glad to recommend your firm or make some other bussines in the future orders. Wish you the best.
D**R
Stating the bleeding obvious for 300 pages
I got this as it was apparently "the book" for the subject but I (and a colleague) were amazed at how utterly basic and useless the content was."The primary reason to apply Drop Foreign Key Constraint is to no longer enforce data dependencies at the database level ...""Dropping a view does not delete any data from your database; however, it does mean that the view is no longer available to the external programs that access it."And so on.
Trustpilot
1 day ago
2 months ago