SlideShare a Scribd company logo
July 1, 2009




   Evolutionary
 database design


                     DevClub.eu,
                      30.06.2009

                   Andrei Solntsev
Agenda

 begin
  » background
  » my experience
  » tools
 end;
begin

 процесс разработки программного обеспечения

  Плановый («водопад»)               Эволюционный
  На раннем этапе                    • Допускать изменения
  • выявить требования,              на всех стадиях
  • согласовать,                     • Но управлять изменениями
  • спроектировать,
  • согласовать
  и затем приступить к кодированию
                                     принципиальная позиция –
минимизация изменений за счет        максимально упростить
обширной предварительной работы.     возможность изменений
@author                                              Martin Fowler

1999: Refactoring: Improving
the Design of Existing Code
http://www.amazon.com/exec/obidos/ASIN/0201485672




     2000: Continuous Integration
     http://www.martinfowler.com/articles/continuousIntegration.html




2003: Evolutionary Database Design
http://www.martinfowler.com/articles/evodb.html
@compare


  Рефакторинг базы данных сложнее, чем рефакторинг кода


       • Сохранение информационной семантики
           • Миграция данных
          • В отличие от обычного ПО, невозможно просто
          удалить старый код и заменить новым.

       • большое количество связей
           • период поддержки устаревшего кода
<img src=“book.pdf”/>
@experience

My experience
 PRIA
 HireRight
 HireRight 2.0 ?
PRIA

                                                     Single DB environment




  Developers   Product Manager   Salespeople




                       Production
                                                 Production
    Testers
                                                   Users




                                               Deployment is not a problem 
Multi-DB environment



  Developer #1   Tester #1

                             Salespeople      Production
                                                Users




                              Demo           Production



  Developer #2   Tester #2


                               Deployment becomes a problem 
HireRight: deployment
                     CVS                              DB

 ALTER TABLE man ADD
 COLUMN length
 Create index man_idx

          CREATE INDEX              Installation
          women_id_idx              scripts



DROP TABLE raha

       CREATE TABLE money (
          eek NUMBER
                                                   Problems:
       );                                          • scripts reinstallation
                                                   • DB recreation
       ALTER TABLE money ADD CONS                  • DB synchronization
Database Change Management

 An automated process is needed to make the process of
 upgrading out-of-date databases simple

    We need a Database Change Management tool.

 My findings:
            Ruby migrations - http://www.oracle.com/technology/pub/articles/kern-rails-migrations.html
            RedGate SQL compare - http://www.red-gate.com/products/SQL_Compare/index.htm

            MySQL Workbench – Diff & Synchronization
            http://dev.mysql.com/tech-resources/articles/workbench_database_management.html


            Oracle Enterprise Manager (change management pack)

            DB Deploy               - http://dbdeploy.com/
            LiquiBase               - http://www.liquibase.org/
Apache DDL Utils
                                                   http://db.apache.org/ddlutils/


 <database name="testdb">
   <table name="author">
     <column name="author_id" type="INTEGER"
        primaryKey="true" required="true"/>
     <column name="name" type="VARCHAR"
        size="50" required="true"/>
     <column name="organisation" type="VARCHAR"
        size="50" required="false"/>
   </table>

   <index name="book_isbn">
     <index-column name="isbn"/>
   </index>
 </database>

  Based on XML, automatically generates SQL scripts to update DB.
Incremental Schema Changes

 All database schemas can be thought of as a compilation of
  incremental changes made over time to accommodate new
  functionality
 As updates are applied to a database, the changes will be
  recorded in a table similar to the following:


                     Change                      Date

     1_Create_Customer_Table.sql                 4-15-07
     2_Add_e-mail_address_column.sql             4-17-07
     3_Add_fax_number_column.sql                 4-18-07
     4_Add_transaction_table.sql                 4-21-07
     5_Add_transaction_status_column.sql         4-24-07
     6_Add_customer-transaction_view.sql         4-27-07
DBDeploy                                        ThoughWorks.com


   1. Go to directory with SQL files:
       • “1 create_customer_table.sql”
       • “2 add_customer_id_constraint.sql”
       • …
   • Run “ant”
Output:
[dbdeploy] dbdeploy 3.0-SNAPSHOT
[dbdeploy] Reading change scripts from directory
               /tmp/dbdeploy/dbdeploy-3.0-SNAPSHOT/example...
[dbdeploy] Changes currently applied to database:
[dbdeploy]   (none)
[dbdeploy] Scripts available:
[dbdeploy]   1, 2
[dbdeploy] To be applied:
[dbdeploy]   1, 2
[dbdeploy] Generating undo scripts...
     [sql] Executing resource:
               /tmp/dbdeploy/dbdeploy-3.0-SNAPSHOT/example/output.sql
     [sql] 7 of 7 SQL statements executed successfully
DBDeploy options

   • Naming convention for delta scripts:
       NUMBER COMMENT.SQL


   • Re-execution – NOT POSSIBLE


   • Undo section – marked by comments:

CREATE TABLE FOO (
       FOO_ID INTEGER NOT NULL, FOO_VALUE VARCHAR(30) );
ALTER TABLE FOO ADD CONSTRAINT PK_FOO PRIMARY KEY (FOO_ID);
--//@UNDO
DROP TABLE FOO;



http://dbdeploy.com/documentation/getting-started/rules-for-using-dbdeploy/
LiquiBase                                     LiquiBase.org


 The main XML describing all delta scripts:
 <databaseChangeLog>
     <changeSet id="1" author="bob">
         <createTable tableName="department">
             <column name="id" type="int">
                 <constraints primaryKey="true" nullable="false"/>
             </column>
             <column name="name" type="varchar(50)">
                 <constraints nullable="false"/>
             </column>
             <column name="active" type="boolean" defaultValue="1"/>
         </createTable>
     </changeSet>
 </databaseChangeLog>
LiquiBase

 Run:

 liquibase --driver=com.mysql.jdbc.Driver 
  --classpath=/path/to/classes 
  --changeLogFile=com/example/db.changelog.xml 
  --url="jdbc:mysql://localhost/example" 
  --username=user 
  --password=asdf 
  migrate

  Also possible to run:
  • Ant script
  • Maven plugin
  • Built-in java code
  • Spring
  • Grails
  • Servlet Listener
LiquiBase options

  • Custom order of scripts (user-defined)

  • Re-execution – POSSIBLE (with attributes)
LiquiBase options


                    And many other options:
                    • DBMS
                    • SQL checksum
                    • context
                    • long transaction
                    • pre-conditions
Outcome

 My findings:

 RedGate SQL compare                             1. commercial
 MySQL Workbench – Diff & Synchronization        2. RDBMS-specific
                                                 3. but probably good
 Oracle Enterprise Manager


 Ruby migrations      - Seems to be cool, need to try
                      - Written on Ruby

 DB Deploy           - Written by authoritative people
                     - Simple
                     - Convection over configuration
                                                                 Written
 LiquiBase           - More configuration than DBDeploy            on
                     - More options than DBDeploy                 Java
                     - Works with any RDBMS
                     - Eclipse plugin
end;



   Links:
   http://www.refactoring.com/       - Code refactoring (1999)
   http://databaserefactoring.com/   - DB refactoring (2003)



   Books:
   Рефакторинг баз данных: эволюционное проектирование.
   http://www.williamspublishing.com/Books/978-5-8459-1157-5.html
Ad

More Related Content

What's hot (20)

Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flyway
Jonathan Holloway
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
Ulrich Krause
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
balassaitis
 
Continuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With LiquibaseContinuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With Liquibase
Aidas Dragūnas
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
Illia Seleznov
 
Instruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environmentInstruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environment
Madhusudan Pisipati
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
balassaitis
 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
Mike Willbanks
 
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your ApplicationsThe Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
balassaitis
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deployment
rsnarayanan
 
Agile Database Development with Liquibase
Agile Database Development with LiquibaseAgile Database Development with Liquibase
Agile Database Development with Liquibase
Tim Berglund
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
Dimitris Andreadis
 
Flyway: The agile database migration framework for Java
Flyway: The agile database migration framework for JavaFlyway: The agile database migration framework for Java
Flyway: The agile database migration framework for Java
Axel Fontaine
 
Liquibase
LiquibaseLiquibase
Liquibase
Sergii Fesenko
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014
Dimitris Andreadis
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easier
pdhannan
 
Drupal 8 deploying
Drupal 8 deployingDrupal 8 deploying
Drupal 8 deploying
Andrew Siz
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringar
Squeed
 
Liquibase
LiquibaseLiquibase
Liquibase
Roman Uholnikov
 
Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flyway
Jonathan Holloway
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
Ulrich Krause
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
balassaitis
 
Continuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With LiquibaseContinuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With Liquibase
Aidas Dragūnas
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
Illia Seleznov
 
Instruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environmentInstruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environment
Madhusudan Pisipati
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
balassaitis
 
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your ApplicationsThe Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
balassaitis
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deployment
rsnarayanan
 
Agile Database Development with Liquibase
Agile Database Development with LiquibaseAgile Database Development with Liquibase
Agile Database Development with Liquibase
Tim Berglund
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
Dimitris Andreadis
 
Flyway: The agile database migration framework for Java
Flyway: The agile database migration framework for JavaFlyway: The agile database migration framework for Java
Flyway: The agile database migration framework for Java
Axel Fontaine
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014
Dimitris Andreadis
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easier
pdhannan
 
Drupal 8 deploying
Drupal 8 deployingDrupal 8 deploying
Drupal 8 deploying
Andrew Siz
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringar
Squeed
 

Viewers also liked (14)

Algorithm Design
Algorithm DesignAlgorithm Design
Algorithm Design
MD.ASHIQUZZAMAN KHONDAKER
 
Generative Design Research
Generative Design ResearchGenerative Design Research
Generative Design Research
Joanna Rutkowska
 
A database design_report_for_college_library final
A database design_report_for_college_library finalA database design_report_for_college_library final
A database design_report_for_college_library final
Saira Iqbal
 
Generative Design with Grasshopper®
Generative Design with Grasshopper®Generative Design with Grasshopper®
Generative Design with Grasshopper®
Antonio Turiello
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Lesson 1 parametric design 2 final
Lesson 1   parametric design 2 finalLesson 1   parametric design 2 final
Lesson 1 parametric design 2 final
Itai Cohen
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
Kawsar Ahmed
 
Generative design
Generative designGenerative design
Generative design
Riya Bagchi
 
Parametric Design
Parametric DesignParametric Design
Parametric Design
Dipesh Pradhan
 
Algorithm.ppt
Algorithm.pptAlgorithm.ppt
Algorithm.ppt
Tareq Hasan
 
Theory of architecture
Theory of architectureTheory of architecture
Theory of architecture
Krishna Jhawar
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
Generative Design and Design Hacking
Generative Design and Design HackingGenerative Design and Design Hacking
Generative Design and Design Hacking
Designit
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017
John Maeda
 
Generative Design Research
Generative Design ResearchGenerative Design Research
Generative Design Research
Joanna Rutkowska
 
A database design_report_for_college_library final
A database design_report_for_college_library finalA database design_report_for_college_library final
A database design_report_for_college_library final
Saira Iqbal
 
Generative Design with Grasshopper®
Generative Design with Grasshopper®Generative Design with Grasshopper®
Generative Design with Grasshopper®
Antonio Turiello
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Lesson 1 parametric design 2 final
Lesson 1   parametric design 2 finalLesson 1   parametric design 2 final
Lesson 1 parametric design 2 final
Itai Cohen
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
Kawsar Ahmed
 
Generative design
Generative designGenerative design
Generative design
Riya Bagchi
 
Theory of architecture
Theory of architectureTheory of architecture
Theory of architecture
Krishna Jhawar
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
Generative Design and Design Hacking
Generative Design and Design HackingGenerative Design and Design Hacking
Generative Design and Design Hacking
Designit
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017
John Maeda
 
Ad

Similar to Evolutionary Database Design (20)

Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
Neev Technologies
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
Mike Willbanks
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
Kellyn Pot'Vin-Gorman
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
Bryan Cafferky
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
Teamstudio
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
Azure Riyadh User Group
 
Database CI/CD Pipeline
Database CI/CD PipelineDatabase CI/CD Pipeline
Database CI/CD Pipeline
muhammadhashir57
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database design
Salehein Syed
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptx
LadduAnanu
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
Tobias Koprowski
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
Matt Nolan
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON
 
Day2
Day2Day2
Day2
madamewoolf
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
Steve Min
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DB
UniFabric
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
PARIKSHIT SAVJANI
 
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
MediaMongrels Ltd
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
Neev Technologies
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
Mike Willbanks
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
Bryan Cafferky
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
Teamstudio
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database design
Salehein Syed
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptx
LadduAnanu
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
Tobias Koprowski
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
Matt Nolan
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
Steve Min
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DB
UniFabric
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
PARIKSHIT SAVJANI
 
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
MediaMongrels Ltd
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
Ad

More from Andrei Solntsev (20)

Тройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOSТройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOS
Andrei Solntsev
 
Flaky tests. Метод.
Flaky tests. Метод. Flaky tests. Метод.
Flaky tests. Метод.
Andrei Solntsev
 
Батл: Тесты или не тесты?
Батл: Тесты или не тесты?Батл: Тесты или не тесты?
Батл: Тесты или не тесты?
Andrei Solntsev
 
Как получить чёрный пояс по программированию
Как получить чёрный пояс по программированиюКак получить чёрный пояс по программированию
Как получить чёрный пояс по программированию
Andrei Solntsev
 
Selenide puzzlers @ devclub.eu
Selenide puzzlers @ devclub.euSelenide puzzlers @ devclub.eu
Selenide puzzlers @ devclub.eu
Andrei Solntsev
 
What is master @ SeleniumConf 2015
What is master @ SeleniumConf 2015What is master @ SeleniumConf 2015
What is master @ SeleniumConf 2015
Andrei Solntsev
 
50 оттенков play!
50 оттенков play!50 оттенков play!
50 оттенков play!
Andrei Solntsev
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOps
Andrei Solntsev
 
Экономически эффективный процесс тестирования (Codefest 2015)
Экономически эффективный процесс тестирования (Codefest 2015)Экономически эффективный процесс тестирования (Codefest 2015)
Экономически эффективный процесс тестирования (Codefest 2015)
Andrei Solntsev
 
Bullshit driven development
Bullshit driven developmentBullshit driven development
Bullshit driven development
Andrei Solntsev
 
Good test = simple test (with selenide)
Good test = simple test (with selenide)Good test = simple test (with selenide)
Good test = simple test (with selenide)
Andrei Solntsev
 
The fast and the continuous - SQA Days 16
The fast and the continuous - SQA Days 16The fast and the continuous - SQA Days 16
The fast and the continuous - SQA Days 16
Andrei Solntsev
 
The fast and the continuous (SeleniumCamp 2014)
The fast and the continuous (SeleniumCamp 2014)The fast and the continuous (SeleniumCamp 2014)
The fast and the continuous (SeleniumCamp 2014)
Andrei Solntsev
 
Liquibase: Enterprise Edition
Liquibase: Enterprise EditionLiquibase: Enterprise Edition
Liquibase: Enterprise Edition
Andrei Solntsev
 
Static website-generators
Static website-generatorsStatic website-generators
Static website-generators
Andrei Solntsev
 
Extreme banking
Extreme bankingExtreme banking
Extreme banking
Andrei Solntsev
 
Real-life unit tests
Real-life unit testsReal-life unit tests
Real-life unit tests
Andrei Solntsev
 
WTF Code @ jug.lv
WTF Code @ jug.lvWTF Code @ jug.lv
WTF Code @ jug.lv
Andrei Solntsev
 
Android (Devclub.eu, 30.03.2010)
Android (Devclub.eu, 30.03.2010)Android (Devclub.eu, 30.03.2010)
Android (Devclub.eu, 30.03.2010)
Andrei Solntsev
 
Тройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOSТройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOS
Andrei Solntsev
 
Flaky tests. Метод.
Flaky tests. Метод. Flaky tests. Метод.
Flaky tests. Метод.
Andrei Solntsev
 
Батл: Тесты или не тесты?
Батл: Тесты или не тесты?Батл: Тесты или не тесты?
Батл: Тесты или не тесты?
Andrei Solntsev
 
Как получить чёрный пояс по программированию
Как получить чёрный пояс по программированиюКак получить чёрный пояс по программированию
Как получить чёрный пояс по программированию
Andrei Solntsev
 
Selenide puzzlers @ devclub.eu
Selenide puzzlers @ devclub.euSelenide puzzlers @ devclub.eu
Selenide puzzlers @ devclub.eu
Andrei Solntsev
 
What is master @ SeleniumConf 2015
What is master @ SeleniumConf 2015What is master @ SeleniumConf 2015
What is master @ SeleniumConf 2015
Andrei Solntsev
 
50 оттенков play!
50 оттенков play!50 оттенков play!
50 оттенков play!
Andrei Solntsev
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOps
Andrei Solntsev
 
Экономически эффективный процесс тестирования (Codefest 2015)
Экономически эффективный процесс тестирования (Codefest 2015)Экономически эффективный процесс тестирования (Codefest 2015)
Экономически эффективный процесс тестирования (Codefest 2015)
Andrei Solntsev
 
Bullshit driven development
Bullshit driven developmentBullshit driven development
Bullshit driven development
Andrei Solntsev
 
Good test = simple test (with selenide)
Good test = simple test (with selenide)Good test = simple test (with selenide)
Good test = simple test (with selenide)
Andrei Solntsev
 
The fast and the continuous - SQA Days 16
The fast and the continuous - SQA Days 16The fast and the continuous - SQA Days 16
The fast and the continuous - SQA Days 16
Andrei Solntsev
 
The fast and the continuous (SeleniumCamp 2014)
The fast and the continuous (SeleniumCamp 2014)The fast and the continuous (SeleniumCamp 2014)
The fast and the continuous (SeleniumCamp 2014)
Andrei Solntsev
 
Liquibase: Enterprise Edition
Liquibase: Enterprise EditionLiquibase: Enterprise Edition
Liquibase: Enterprise Edition
Andrei Solntsev
 
Static website-generators
Static website-generatorsStatic website-generators
Static website-generators
Andrei Solntsev
 
Android (Devclub.eu, 30.03.2010)
Android (Devclub.eu, 30.03.2010)Android (Devclub.eu, 30.03.2010)
Android (Devclub.eu, 30.03.2010)
Andrei Solntsev
 

Recently uploaded (20)

TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 

Evolutionary Database Design

  • 1. July 1, 2009 Evolutionary database design DevClub.eu, 30.06.2009 Andrei Solntsev
  • 2. Agenda  begin » background » my experience » tools  end;
  • 3. begin процесс разработки программного обеспечения Плановый («водопад») Эволюционный На раннем этапе • Допускать изменения • выявить требования, на всех стадиях • согласовать, • Но управлять изменениями • спроектировать, • согласовать и затем приступить к кодированию принципиальная позиция – минимизация изменений за счет максимально упростить обширной предварительной работы. возможность изменений
  • 4. @author Martin Fowler 1999: Refactoring: Improving the Design of Existing Code http://www.amazon.com/exec/obidos/ASIN/0201485672 2000: Continuous Integration http://www.martinfowler.com/articles/continuousIntegration.html 2003: Evolutionary Database Design http://www.martinfowler.com/articles/evodb.html
  • 5. @compare Рефакторинг базы данных сложнее, чем рефакторинг кода • Сохранение информационной семантики • Миграция данных • В отличие от обычного ПО, невозможно просто удалить старый код и заменить новым. • большое количество связей • период поддержки устаревшего кода
  • 7. @experience My experience  PRIA  HireRight  HireRight 2.0 ?
  • 8. PRIA Single DB environment Developers Product Manager Salespeople Production Production Testers Users Deployment is not a problem 
  • 9. Multi-DB environment Developer #1 Tester #1 Salespeople Production Users Demo Production Developer #2 Tester #2 Deployment becomes a problem 
  • 10. HireRight: deployment CVS DB ALTER TABLE man ADD COLUMN length Create index man_idx CREATE INDEX Installation women_id_idx scripts DROP TABLE raha CREATE TABLE money ( eek NUMBER Problems: ); • scripts reinstallation • DB recreation ALTER TABLE money ADD CONS • DB synchronization
  • 11. Database Change Management An automated process is needed to make the process of upgrading out-of-date databases simple  We need a Database Change Management tool. My findings: Ruby migrations - http://www.oracle.com/technology/pub/articles/kern-rails-migrations.html RedGate SQL compare - http://www.red-gate.com/products/SQL_Compare/index.htm MySQL Workbench – Diff & Synchronization http://dev.mysql.com/tech-resources/articles/workbench_database_management.html Oracle Enterprise Manager (change management pack) DB Deploy - http://dbdeploy.com/ LiquiBase - http://www.liquibase.org/
  • 12. Apache DDL Utils http://db.apache.org/ddlutils/ <database name="testdb"> <table name="author"> <column name="author_id" type="INTEGER" primaryKey="true" required="true"/> <column name="name" type="VARCHAR" size="50" required="true"/> <column name="organisation" type="VARCHAR" size="50" required="false"/> </table> <index name="book_isbn"> <index-column name="isbn"/> </index> </database> Based on XML, automatically generates SQL scripts to update DB.
  • 13. Incremental Schema Changes  All database schemas can be thought of as a compilation of incremental changes made over time to accommodate new functionality  As updates are applied to a database, the changes will be recorded in a table similar to the following: Change Date 1_Create_Customer_Table.sql 4-15-07 2_Add_e-mail_address_column.sql 4-17-07 3_Add_fax_number_column.sql 4-18-07 4_Add_transaction_table.sql 4-21-07 5_Add_transaction_status_column.sql 4-24-07 6_Add_customer-transaction_view.sql 4-27-07
  • 14. DBDeploy ThoughWorks.com 1. Go to directory with SQL files: • “1 create_customer_table.sql” • “2 add_customer_id_constraint.sql” • … • Run “ant” Output: [dbdeploy] dbdeploy 3.0-SNAPSHOT [dbdeploy] Reading change scripts from directory /tmp/dbdeploy/dbdeploy-3.0-SNAPSHOT/example... [dbdeploy] Changes currently applied to database: [dbdeploy] (none) [dbdeploy] Scripts available: [dbdeploy] 1, 2 [dbdeploy] To be applied: [dbdeploy] 1, 2 [dbdeploy] Generating undo scripts... [sql] Executing resource: /tmp/dbdeploy/dbdeploy-3.0-SNAPSHOT/example/output.sql [sql] 7 of 7 SQL statements executed successfully
  • 15. DBDeploy options • Naming convention for delta scripts: NUMBER COMMENT.SQL • Re-execution – NOT POSSIBLE • Undo section – marked by comments: CREATE TABLE FOO ( FOO_ID INTEGER NOT NULL, FOO_VALUE VARCHAR(30) ); ALTER TABLE FOO ADD CONSTRAINT PK_FOO PRIMARY KEY (FOO_ID); --//@UNDO DROP TABLE FOO; http://dbdeploy.com/documentation/getting-started/rules-for-using-dbdeploy/
  • 16. LiquiBase LiquiBase.org The main XML describing all delta scripts: <databaseChangeLog> <changeSet id="1" author="bob"> <createTable tableName="department"> <column name="id" type="int"> <constraints primaryKey="true" nullable="false"/> </column> <column name="name" type="varchar(50)"> <constraints nullable="false"/> </column> <column name="active" type="boolean" defaultValue="1"/> </createTable> </changeSet> </databaseChangeLog>
  • 17. LiquiBase Run: liquibase --driver=com.mysql.jdbc.Driver --classpath=/path/to/classes --changeLogFile=com/example/db.changelog.xml --url="jdbc:mysql://localhost/example" --username=user --password=asdf migrate Also possible to run: • Ant script • Maven plugin • Built-in java code • Spring • Grails • Servlet Listener
  • 18. LiquiBase options • Custom order of scripts (user-defined) • Re-execution – POSSIBLE (with attributes)
  • 19. LiquiBase options And many other options: • DBMS • SQL checksum • context • long transaction • pre-conditions
  • 20. Outcome My findings: RedGate SQL compare 1. commercial MySQL Workbench – Diff & Synchronization 2. RDBMS-specific 3. but probably good Oracle Enterprise Manager Ruby migrations - Seems to be cool, need to try - Written on Ruby DB Deploy - Written by authoritative people - Simple - Convection over configuration Written LiquiBase - More configuration than DBDeploy on - More options than DBDeploy Java - Works with any RDBMS - Eclipse plugin
  • 21. end; Links: http://www.refactoring.com/ - Code refactoring (1999) http://databaserefactoring.com/ - DB refactoring (2003) Books: Рефакторинг баз данных: эволюционное проектирование. http://www.williamspublishing.com/Books/978-5-8459-1157-5.html