Transcript
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH SICSone GmbH © 2014 SICSone GmbH
Database Change Management
Dominik Hirt
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
IUG Workshop 25.03.2014
Informix Datenbankserver der Gegenwart und Zukunft ?
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
IUG Workshop 25.03.2014
Informix Datenbankserver der Gegenwart und Zukunft ? „Prognosen sind schwierig, vor allem wenn sie die Zukunft betreffen“ Niels Bohr u.a.
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
IUG Workshop 25.03.2014
Informix Datenbankserver der Gegenwart und Zukunft ? Agile / Inkrementelle/ Iterative Software Entwicklung
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
IUG Workshop 25.03.2014
Inhalt ! Ziele eines Database Change Managements ! Unterschiede Change Management
SourceCode vs. DB ! Spezifika Enterprise Java ! Eine mögliche Lösung ! Diskussion
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
IUG Workshop 25.03.2014
Ziele ! Inkrementelle Änderungen an SourceCode
und Datenbank Schema
! SourceCode und Datenbank Schema müssen zueinander passen
! Benutzung von beliebigen Ständen aus der Vergangenheit
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management I
Editor / IDE
Unit Test
SVN / Git
Continuous Integration
Continuous Delivery
Integration Test Agile
Iteration
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management I ! Vorteile
! De-Facto Standard in Agilen Teams / Prozesse ! Hohe Flexibilität ! Entwickler sind unabhängig voneinander, inbesondere mit dezentralen SCM (Git) ! Source Code Änderungen immer inkrementell
! Feature Driven Development ! Viele kleine Wasserfälle ! Pro Feature eine Iteration durchlaufen
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management II
DB Applikation
Impedance Mismatch 1
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management II
DB 1 Testsystem 1
DB 2 Testsystem 2
DB 3 Testsystem 3
Mismatch 2
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management II
DB 1 Trunk
DB 2 Branch 1.x
DB 3 Branch 2.x
Migration ?
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Anforderungen
! Inkrementelle Änderungen von DB Schema (und Daten) verwalten
! Integrität von Migrationen
! Nach commit ins SCM
! Verhindern von parallelen Migrationen ! Rollback
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Enterprise Java
! Einbindung in Buildprozess (Maven / Ant / Gradle)
! JDBC ready
! Support für JEE Frameworks (Spring / Hibernate)
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Liquibase
! Structural Refactorings ! Add Column, Rename Column, Modify Column, Drop Column, Alter Sequence,
Create Table, Rename Table, Drop Table, Create View, Rename View, Drop View, Merge Columns, Create Stored Procedure
! Data Quality Refactorings ! Add Lookup Table, Add Not-Null Constraint, Remove Not-Null Constraint, Add
Unique Constraint, Drop Unique Constraint, Create Sequence, Drop Sequence, Add Auto-Increment, Add Default Value, Drop Default Value
! Referential Integrity Refactorings ! Add Foreign Key Constraint, Drop Foreign Key, Constraint, Drop All Foreign Key
Constraints, Add Primary Key Constraint, Drop Primary Key Constraint
! Non-Refactoring Transformations ! Insert Data, Load Data, Load Update Data, Update Data, Delete Data, Tag
Database
! Custom Refactorings ! Modifying Generated SQL, Custom SQL, Custom SQL File, Custom Refactoring
Class, Execute Shell Command
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Alternativen
! Flyway
! Autopatch @ GitHub
! MyBatis Migrations
Copyright © SIC 2012 SICSone GmbH © 2014 SICSone GmbH
Change Management II
ChangeSet UnitTest Commit SCM
Continuous Integration
DB 1 DB 2
Continuous Deployment
Integration Tests
DB 3
top related