Published Sep 3, 2019

Episode 186: Martin Fowler and Pramod Sadalage on Agile Database Development

Martin Fowler and Pramod Sadalage delve into the intricacies of agile database development, emphasizing collaborative practices, effective migration strategies, and the integration of continuous integration techniques to ensure data integrity and improve software quality.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Questions from this episode

Episode Highlights

  • Migration Techniques

    Database migration is a critical aspect of agile development, requiring careful planning and execution to ensure data integrity and application functionality. emphasizes the importance of testing migration scripts in pre-production environments to gauge their duration and optimize them for efficiency 1. This approach helps in identifying potential issues and allows for phased migrations, where initial data is moved, and subsequent changes are applied later 1.

    We wrote a probe in our application that actually we pulled out a random document and see if it can parse that. If it can parse that, then it knew that I can actually read this database or else I cannot.

    ---

    This technique ensures that the application can interact with the database without losing data, thus preventing orphan data scenarios 2.

       

    Transition Phases

    Handling transition phases during database migrations is crucial for maintaining system compatibility and continuity. discusses using views and triggers to manage changes, allowing both old and new database schemas to coexist 3. This approach is akin to code refactoring, where temporary solutions are implemented to ensure seamless operation until the transition is complete 4.

    You apply triggers and then you move data. Like if the new column is not null, that means the new column is being updated by the application.

    ---

    Such techniques are essential in environments where multiple applications interact with the database, ensuring that changes do not disrupt existing functionalities 3.

       

    Migration Strategies

    Backward and forward migrations present unique challenges and require strategic planning to avoid data loss and ensure smooth transitions. highlights the importance of small, incremental migrations that change schema and data together, a principle applicable to both SQL and NoSQL databases 5. notes the complexity of backward migrations, particularly when data might be lost if tables are dropped prematurely 6.

    You need to realize how you are going to use it. I am not saying you should not drop the table ever, or you should drop the table always. It depends.

    ---

    Advanced techniques, such as introducing new tables before code changes, help in managing rollbacks effectively, preserving data integrity during migrations 7.

Related Episodes