|
Recent
Articles |
Installing Essentials 2007 On A Remote Instance... Dide you know can use a remote SQL server for the databases? It's true, but there are a few things to be aware of... SQL Reporting 2005 SP1 must be...
CfObjective - Mark Mandel & Transfer ORM (As before please pardon the writing.) The problem that we need to solve is writing all the objects that model your database. This is a long and painful process.
What Employers Seek In Oracle Candidates There are hundreds, if not thousands, of high tech computer jobs open for those with Oracle expertise. The highly reputable and popular Oracle products are...
Important Issues Regarding Database Tools The sql server primary query language is Transact-SQL, an implementation of the ANSI/ISO standard Structured Query Language (SQL) used by both Sql server...
DevWeek: Day 2 Recap Niels Berglund's "ADO.Net v.Next and the Entity Framework" was the first lecture of the day, I decided to skip Dino Espistos lecture after I read his slides...
Record Locking In SQL Server Pessimistic and Optimistic Concurrency. In a multi-user environment, there are two models for updating data in a database: optimistic concurrency and pessimistic...
|
|
|
|
06.06.07
Review: Refactoring Databases
By
James Taylor
Scott Ambler and Pramod Sadalage wrote Refactoring Databases, they say, "to share their experiences and techniques at evolving database schemas via refactoring".
The book, particularly in the thorough list of refactorings detailed in later chapters, reveals them to be experienced users of, and writers about, agile development approaches. Their core premise is that data and databases must evolve in the same way as code does - that is incrementally.
They argue persuasively that a big-bang, up-front approach to database design is unacceptable in a modern environment. There is simply too much change and too much uncertainty in the business world for this to be realistic. The basic techniques for evolutionary database design include refactoring (the topic of the book), evolving the data model, database regression testing and configuration management and developer sandboxes. This more evolutionary approach is going to be a big shock for many data professionals, something the authors note, but I think the need for effective evolution and ongoing development of applications and thus their databases is compelling. "Change time", the period after an application (or database) is first deployed is bar far the majority of the life of an application. Techniques that help you cope with this, like database refactoring, are a good thing. Database refactoring as described in the book, is part of an evolutionary approach and with development teams taking on SCRUM, XP and other agile methods it is more important than ever for database teams to do likewise. Many data professionals will likely have the same knee-jerk reaction I did when first approaching this - Why not just get it right up front? But if you believe that agile model-driven development is here to stay for code then you have to accept the need for the same approach to database design.
Martin Fowler's original "Refactoring: Improving the Design of Existing Code" book made the point that a refactoring must retain the behavioral semantics of the code and this is just as true in databases. The authors take great pains to explain refactoring in enough detail that it you can apply it constantly to keep the database as clean and easy to modify as possible. They emphasize repeatedly the value of test-driven or test first development - even in database design and deployment. The authors stress the importance of testing, especially regression testing, of all the components that access a database when refactoring it. They advise making refactoring efforts small as well as test-driven. They point out that refactoring should be done as a series of small steps and that database develops must not succumb to the temptation to combine refactorings into larger, more complex efforts. The need to treat database designs, and even data, as artifacts subject to change control comes through loud and clear.
The concept of a potentially very long transition period in which both the old and new schemas are supported is a particularly good one. I worry about the organizational dynamics of having the old schema removed by a new team that does not remember the original refactoring but nothing else seems rational in a typical environment where many applications run against the same database. I also liked the paranoia of the authors, for instance in their suggestion to always run regression tests BEFORE refactoring to make sure the database is actually as you think it is!
Continue reading this article.
About the Author: VP of Product Marketing with a passion for the technologies of decision automation. 15 years designing, developing, releasing and marketing advanced enterprise software platforms and development tools. Across the board experience in software development, engineering and product management and product marketing.
http://www.edmblog.com
|