SlideShare a Scribd company logo
1 of 89
AGILE DATABASE
 DEVELOPMENT
     WITH


     Tim Berglund
      June, 2009
TIM BERGLUND
WE BELIEVE CODE
   CHANGES
WE BELIEVE CODE
   CHANGES
WE ACT LIKE THE
DATABASE DOESN’T
WE ACT LIKE THE
DATABASE DOESN’T
TERMINAL
MALADAPTION
EMBALMING
WON’T DIE
NOT REALLY ALIVE
CURSES THE DBA
WHO CHANGES IT
WE WILL
BREAK
 THE
CURSE
AGILE DATABASE
 DEVELOPMENT
Refactoring



                                  Evolutionary
Automated
                                      Data
 Testing                            Modeling



                  Agile
                Database
               Development




     Source
                              Sandboxes
     Control
REFACTORING
REFACTORING
REFACTORING

   This term
occasionally gets
    abused!
REFACTORING
   A disciplined way to
make small changes to your
source code to improve its
 design, making it easier to
         work with.
REFACTORING

Not adding
 features!
REFACTORING

Not fixing bugs!
REFACTORING
 Opportunistically
improving design to
  accommodate
     change.
DATABASE REFACTORING


       A simple change to a
 database schema that improves
its design while retaining both its
   behavioral and informational
            semantics.
EVOLUTIONARY
DATA MODELING
EVOLUTIONARY
  DATA MODELING

NOT TRYING TO “GET IT RIGHT UP
          FRONT.”
EVOLUTIONARY
 DATA MODELING

MAYBE SOME BIG THOUGHTS AT
          FIRST
EVOLUTIONARY
  DATA MODELING

BUILD THE SIMPLEST THING THAT
CAN POSSIBLY WORK...EVERY DAY
DATABASE TESTS


  TDD IN THE DB
DATABASE TESTS
DATABASE TESTS

 STORED PROCEDURES
DATABASE TESTS

 STORED PROCEDURES
     SQLUNIT
DATABASE TESTS

 STORED PROCEDURES
     SQLUNIT
      DBUNIT
DATABASE TESTS

 STORED PROCEDURES
     SQLUNIT
      DBUNIT
  CUSTOM HYBRIDS
SOURCE CONTROL
SOURCE CONTROL




LIKE MOTHER TAUGHT YOU
SOURCE CONTROL
SOURCE CONTROL

          DDL
EXTRACT/MIGRATION SCRIPTS
     REFERENCE DATA
 STORED PROCS/TRIGGERS
SANDBOXES
COMMAND-LINE TOOL
COMMAND-LINE TOOL
    JAVA/JDBC
COMMAND-LINE TOOL
    JAVA/JDBC
  CROSS-PLATFORM
COMMAND-LINE TOOL
        JAVA/JDBC
     CROSS-PLATFORM
ANT, MAVEN, SPRING, GRAILS
CHANGELOG
CHANGELOG
COMMANDS
CHANGELOG
    COMMANDS
MIGRATION SCENARIOS
CHANGELOG
CHANGELOG

 SQL IN XML
CHANGELOG

   SQL IN XML
COHERENT GROUPS OF
   OPERATIONS
CHANGELOG

    SQL IN XML
COHERENT GROUPS OF
   OPERATIONS
TRACKED IN DATABASE
CHANGELOG
	   <changeSet author="tlberglund (generated)" id="1236660747556-11">
	   	   <createTable tableName="scshoppingcart">
	   	   	   <column autoIncrement="true" name="id" type="INT">
	   	   	   	    <constraints nullable="false"/>
	   	   	   </column>
	   	   	   <column name="userid" type="INT">
	   	   	   	    <constraints nullable="false"/>
	   	   	   </column>
	   	   	   <column name="lastmodified" type="DATETIME"/>
	   	   	   <column name="name" type="VARCHAR(50)"/>
	   	   </createTable>
	   </changeSet>

	   <changeSet author="tlberglund" id="spot-1-1-2">
	   	   <renameTable oldTableName="scscrubrecordwarehouse"
                     newTableName="scrub_record_log" />
	   </changeSet>
LIQUIBASE
COMMANDS
LIQUIBASE
   COMMANDS


generateChangeLog
LIQUIBASE
 COMMANDS


changeLogSync
LIQUIBASE
COMMANDS


 update
LIQUIBASE
COMMANDS


   tag
LIQUIBASE
COMMANDS


 rollback
LIQUIBASE
COMMANDS


   diff
DEMO
AND WE’RE BACK
Refactoring



                                  Evolutionary
Automated
                                      Data
 Testing                            Modeling



                  Agile
                Database
               Development




     Source
                              Sandboxes
     Control
CULTIVATING THE
 BROWNFIELD
LEGACY ENTERPRISE
      APP
NEW GRAILS
 HOTNESS
HARD CUTOVER
CREATIVE ORM
  MAPPINGS
WITHERING ON THE
VINE
BROWNFIELD DATA
  INTEGRATION
BROWNFIELD DATA
  INTEGRATION
 TIME ZERO MIGRATION
BROWNFIELD DATA
  INTEGRATION
 TIME ZERO MIGRATION
BROWNFIELD
  TESTING
BROWNFIELD
   TESTING


INTEGRATION TEST DATA
BROWNFIELD
  TESTING
BROWNFIELD
  TESTING


T0 MIGRATION SCRIPTS
BROWNFIELD
  TESTING
THE
CURSE IS
BROKEN
THANK YOU!

TIM BERGLUND
AUGUST TECHNOLOGY GROUP, LLC
http://www.augusttechgroup.com
tim.berglund@augusttechgroup.com
@tlberglund
PHOTO CREDITS
HAMMER SHATTERING GLASS: HTTP://WWW.FLICKR.COM/PHOTOS/WHISPERWOLF/3486270713
DODO: HTTP://WWW.INTERNATIONALDOVESOCIETY.COM/MISCSPECIES/DODO.HTM
EMBALMING: HTTP://LIBRARY.THINKQUEST.ORG/C0116982/HTML%20PAGE%20FOLDER/
HMUMMIFICATION.HTM
ATTACKING MUMMY: HTTP://WWW.FLICKR.COM/PHOTOS/ROONBABOON/292393932/
CREEPY MUMMY HEAD: HTTP://WWW.FLICKR.COM/PHOTOS/DR-INI/446311713/
MARTIN FOWLER: HTTP://WWW.FLICKR.COM/PHOTOS/PRAGDAVE/173640462/
SCOTT AMBLER: HTTP://WWW.AMBYSOFT.COM/SCOTTAMBLER.HTML
BRENDEN FRASER: HTTP://SCRAPETV.COM/NEWS/NEWS%20PAGES/ENTERTAINMENT/UNIVERSAL-FIRE-
ACCIDENTAL-NEW-MUMMY-MOVIE-DELIBERATE-SCRAPE-TV-THE-WORLD-ON-YOUR-SIDE.HTML
SAND: HTTP://WWW.FLICKR.COM/PHOTOS/LEVIATHOR/207625319/
MOTHER AND CHILD: HTTP://WWW.FLICKR.COM/PHOTOS/PATRICK_Q/268149208/
BROWN FIELD: HTTP://WWW.FLICKR.COM/PHOTOS/ARTUR02/471094378/
JALOPY: HTTP://WWW.FLICKR.COM/PHOTOS/DRAGONFLEYE/3246153/
JALOPY ON RT 66: HTTP://WWW.FLICKR.COM/PHOTOS/EVOETSCH/2436023218/
PIMPMOBILE: HTTP://WWW.FLICKR.COM/PHOTOS/AIRGAP/1053594933/
JUNKED JALOPY: HTTP://WWW.FLICKR.COM/PHOTOS/JABOOBIE/61014658/
PAINTING CAR: HTTP://WWW.FLICKR.COM/PHOTOS/GARETHJMSAUNDERS/2066690016/

More Related Content

What's hot

Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developersIllia Seleznov
 
Database Change Management as a Service
Database Change Management as a ServiceDatabase Change Management as a Service
Database Change Management as a ServiceAndrew Solomon
 
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ändringarSqueed
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with LiquibaseIllia Seleznov
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibaseYoram Michaeli
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsAndrei Solntsev
 
Liquidating database frustrations with liquibase
Liquidating database frustrations with liquibaseLiquidating database frustrations with liquibase
Liquidating database frustrations with liquibasePaul Churchward
 
Liquibase - Open Source version control for your database
Liquibase - Open Source version control for your databaseLiquibase - Open Source version control for your database
Liquibase - Open Source version control for your databaseBlaine Carter
 
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 JavaAxel Fontaine
 
Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flywayJonathan Holloway
 
Database migrations with Flyway and Liquibase
Database migrations with Flyway and LiquibaseDatabase migrations with Flyway and Liquibase
Database migrations with Flyway and LiquibaseLars Östling
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGirish Bapat
 
3.2\9 SSIS 2008R2_Training - ControlFlow Tasks
3.2\9 SSIS 2008R2_Training - ControlFlow Tasks3.2\9 SSIS 2008R2_Training - ControlFlow Tasks
3.2\9 SSIS 2008R2_Training - ControlFlow TasksPramod Singla
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101IDERA Software
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Workload Replay in the Cloud: Secret Weapon for Cloud Migrations
Workload Replay in the Cloud: Secret Weapon for Cloud MigrationsWorkload Replay in the Cloud: Secret Weapon for Cloud Migrations
Workload Replay in the Cloud: Secret Weapon for Cloud MigrationsJohn Sterrett
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012sqlserver.co.il
 

What's hot (20)

Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
 
Database Change Management as a Service
Database Change Management as a ServiceDatabase Change Management as a Service
Database Change Management as a Service
 
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
 
Database versioning with liquibase
Database versioning with liquibaseDatabase versioning with liquibase
Database versioning with liquibase
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibase
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOps
 
Liquidating database frustrations with liquibase
Liquidating database frustrations with liquibaseLiquidating database frustrations with liquibase
Liquidating database frustrations with liquibase
 
Liquibase - Open Source version control for your database
Liquibase - Open Source version control for your databaseLiquibase - Open Source version control for your database
Liquibase - Open Source version control for your database
 
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
 
Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flyway
 
Database migrations with Flyway and Liquibase
Database migrations with Flyway and LiquibaseDatabase migrations with Flyway and Liquibase
Database migrations with Flyway and Liquibase
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydb
 
3.2\9 SSIS 2008R2_Training - ControlFlow Tasks
3.2\9 SSIS 2008R2_Training - ControlFlow Tasks3.2\9 SSIS 2008R2_Training - ControlFlow Tasks
3.2\9 SSIS 2008R2_Training - ControlFlow Tasks
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Workload Replay in the Cloud: Secret Weapon for Cloud Migrations
Workload Replay in the Cloud: Secret Weapon for Cloud MigrationsWorkload Replay in the Cloud: Secret Weapon for Cloud Migrations
Workload Replay in the Cloud: Secret Weapon for Cloud Migrations
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 

Similar to Database Refactoring With Liquibase

Datastage Online Training @ Adithya Elearning
Datastage Online Training @ Adithya ElearningDatastage Online Training @ Adithya Elearning
Datastage Online Training @ Adithya Elearningshanmukha rao dondapati
 
Testing Big Data solutions fast and furiously
Testing Big Data solutions fast and furiouslyTesting Big Data solutions fast and furiously
Testing Big Data solutions fast and furiouslyKatherine Golovinova
 
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...Lace Lofranco
 
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...Serena Software
 
Database Modernization (Azure SQL Database)
Database Modernization (Azure SQL Database)Database Modernization (Azure SQL Database)
Database Modernization (Azure SQL Database)Radu Vunvulea
 
Introduction of Big data, NoSQL & Hadoop
Introduction of Big data, NoSQL & HadoopIntroduction of Big data, NoSQL & Hadoop
Introduction of Big data, NoSQL & HadoopSavvycom Savvycom
 
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiouslyQA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiouslyQAFest
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
Digital Transformation | AWS Webinar
Digital Transformation | AWS WebinarDigital Transformation | AWS Webinar
Digital Transformation | AWS WebinarAmazon Web Services
 
Test First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in GrailsTest First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in GrailsTim Berglund
 
Test First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTest First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTim Berglund
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaJudy Breedlove
 
Agile integration workshop Atlanta
Agile integration workshop   AtlantaAgile integration workshop   Atlanta
Agile integration workshop AtlantaJeremy Davis
 
What can Bioinformaticians learn from YouTube?
What can Bioinformaticians learn from YouTube?What can Bioinformaticians learn from YouTube?
What can Bioinformaticians learn from YouTube?Matt Wood
 
DB PowerStudio XE DataSheet
DB PowerStudio XE DataSheetDB PowerStudio XE DataSheet
DB PowerStudio XE DataSheetANIL MAHADEV
 
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...Amazon Web Services
 
Selenium-online-training
Selenium-online-trainingSelenium-online-training
Selenium-online-trainingRaghav Arora
 
The Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always WantedThe Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always WantedThoughtworks
 
Search - Journey Of Delivery On A Budget (2014)
Search - Journey Of Delivery On A Budget (2014)Search - Journey Of Delivery On A Budget (2014)
Search - Journey Of Delivery On A Budget (2014)Sam McLeod
 

Similar to Database Refactoring With Liquibase (20)

Datastage Online Training @ Adithya Elearning
Datastage Online Training @ Adithya ElearningDatastage Online Training @ Adithya Elearning
Datastage Online Training @ Adithya Elearning
 
Testing Big Data solutions fast and furiously
Testing Big Data solutions fast and furiouslyTesting Big Data solutions fast and furiously
Testing Big Data solutions fast and furiously
 
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...
DataOps for the Modern Data Warehouse on Microsoft Azure @ NDCOslo 2020 - Lac...
 
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...
DevOps Drive-In: Automate Database Deployments in Your Continuous Delivery Pi...
 
Database Modernization (Azure SQL Database)
Database Modernization (Azure SQL Database)Database Modernization (Azure SQL Database)
Database Modernization (Azure SQL Database)
 
Introduction of Big data, NoSQL & Hadoop
Introduction of Big data, NoSQL & HadoopIntroduction of Big data, NoSQL & Hadoop
Introduction of Big data, NoSQL & Hadoop
 
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiouslyQA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
QA Fest 2019. Дмитрий Собко. Testing Big Data solutions fast and furiously
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
Digital Transformation | AWS Webinar
Digital Transformation | AWS WebinarDigital Transformation | AWS Webinar
Digital Transformation | AWS Webinar
 
Test First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in GrailsTest First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in Grails
 
Test First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTest First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in Grails
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - Atlanta
 
Agile integration workshop Atlanta
Agile integration workshop   AtlantaAgile integration workshop   Atlanta
Agile integration workshop Atlanta
 
What can Bioinformaticians learn from YouTube?
What can Bioinformaticians learn from YouTube?What can Bioinformaticians learn from YouTube?
What can Bioinformaticians learn from YouTube?
 
DB PowerStudio XE DataSheet
DB PowerStudio XE DataSheetDB PowerStudio XE DataSheet
DB PowerStudio XE DataSheet
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
 
Selenium-online-training
Selenium-online-trainingSelenium-online-training
Selenium-online-training
 
The Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always WantedThe Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always Wanted
 
Search - Journey Of Delivery On A Budget (2014)
Search - Journey Of Delivery On A Budget (2014)Search - Journey Of Delivery On A Budget (2014)
Search - Journey Of Delivery On A Budget (2014)
 

More from IASA

Building Feedback Loops
Building Feedback LoopsBuilding Feedback Loops
Building Feedback LoopsIASA
 
Risk Centric Architecture George Fairbanks
Risk Centric Architecture George FairbanksRisk Centric Architecture George Fairbanks
Risk Centric Architecture George FairbanksIASA
 
Resource-Oriented Architecture (ROA) and REST
Resource-Oriented Architecture (ROA) and RESTResource-Oriented Architecture (ROA) and REST
Resource-Oriented Architecture (ROA) and RESTIASA
 
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4IASA
 
Domain Driven Design Up And Running
Domain Driven Design Up And RunningDomain Driven Design Up And Running
Domain Driven Design Up And RunningIASA
 
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...IASA
 
Rethinking Object Orientation
Rethinking Object OrientationRethinking Object Orientation
Rethinking Object OrientationIASA
 
Making Architecture Business Value Driven
Making Architecture Business Value DrivenMaking Architecture Business Value Driven
Making Architecture Business Value DrivenIASA
 

More from IASA (8)

Building Feedback Loops
Building Feedback LoopsBuilding Feedback Loops
Building Feedback Loops
 
Risk Centric Architecture George Fairbanks
Risk Centric Architecture George FairbanksRisk Centric Architecture George Fairbanks
Risk Centric Architecture George Fairbanks
 
Resource-Oriented Architecture (ROA) and REST
Resource-Oriented Architecture (ROA) and RESTResource-Oriented Architecture (ROA) and REST
Resource-Oriented Architecture (ROA) and REST
 
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4
Cloud Computing Bootcamp On The Google App Engine For Iasa V1.2.4
 
Domain Driven Design Up And Running
Domain Driven Design Up And RunningDomain Driven Design Up And Running
Domain Driven Design Up And Running
 
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...
Business and Strategic Alignment in EA – Practical Guidelines Based on Indust...
 
Rethinking Object Orientation
Rethinking Object OrientationRethinking Object Orientation
Rethinking Object Orientation
 
Making Architecture Business Value Driven
Making Architecture Business Value DrivenMaking Architecture Business Value Driven
Making Architecture Business Value Driven
 

Recently uploaded

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Database Refactoring With Liquibase

Editor's Notes

  1. I&amp;#x2019;m your presenter.
  2. I&amp;#x2019;m a Java developer.
  3. I work with a lot of open source technologies.
  4. I haven&amp;#x2019;t written a lot of Java in the past year. Mostly these days I write Groovy.
  5. I participate in the local development community by serving on the boards of www.denveropensource.org and www.iasadenver.org.
  6. The August Technology Group is my consulting firm.
  7. As software developers and architects, our worlds are filled with data.
  8. Unfortunately, the data is not always in the condition we&amp;#x2019;d like. We try to do a good job structuring it, but the reality is that we often fail, and even when we succeed, the business changes enough so that even our successes are short-lived.
  9. Our tool sets and processes have developed to deal expertly with rapidly changing code.
  10. Our tool sets and processes have developed to deal expertly with rapidly changing code.
  11. The same tools and practices have not been applied to data. Leading to one of two problems...
  12. The same tools and practices have not been applied to data. Leading to one of two problems...
  13. Will it die? It is said of evolutionary systems that things that fail to adapt to change die out. If only this were the case with the enterprise database...
  14. Rather than going extinct, the production DBAs surround it like priests, carefully filling it with embalming fluid and wrapping it in linen strips. (And possibly putting some operations personnel in the tomb to serve the database in the afterlife.)
  15. Inability to change and overprotection lead us to this dread antipattern.
  16. There are long-lived Enterprise applications that rely on it, so it can&amp;#x2019;t just go away.
  17. It isn&amp;#x2019;t really alive either, because business needs are constantly changing, but the database can&amp;#x2019;t change with them.
  18. At least the production DBAs seem to think so!
  19. We&amp;#x2019;ll figure out how to manage changes to the database such that we can make them with confidence in a way that brings the best of developer tools to bear and is relatively friendly to DBA workflows. We&amp;#x2019;ll do this with a mindset and a tool.
  20. The fix is what Scott Ambler calls &amp;#x201C;evolutionary [or agile] database development.&amp;#x201D; This consists of five components.
  21. Martin sez...
  22. Martin sez...
  23. Scott sez.... Code refactorings are really only concerned about behavior. DBs have behavior (stored procs, triggers, etc.) but also information. The database must say the same thing in the same way after the refactoring.
  24. These are two mistakes here: one is thinking we&amp;#x2019;re smart enough to do all this designing correctly at the outset&amp;#x2014;we&amp;#x2019;re not. The other is thinking that the database&amp;#x2019;s business context is a static thing&amp;#x2014;it isn&amp;#x2019;t. There is no &amp;#x201C;right&amp;#x201D; up front, because requirements will change constantly.
  25. Which doesn&amp;#x2019;t mean we can&amp;#x2019;t do a couple of days of designing at first; we can. It makes sense to try to anticipate what we can and make big, hard-to-change commitments correctly. We always expect change, though.
  26. TDD adoption in software development is low enough, but it is virtually unheard of in database development. The tooling lags behind and the expertise is singularly rare.
  27. There are ways to do it. The tools aren&amp;#x2019;t what they are for TDD of code, but there are options.
  28. There are ways to do it. The tools aren&amp;#x2019;t what they are for TDD of code, but there are options.
  29. There are ways to do it. The tools aren&amp;#x2019;t what they are for TDD of code, but there are options.
  30. There are ways to do it. The tools aren&amp;#x2019;t what they are for TDD of code, but there are options.
  31. Bring all the knowledge, practices, and advantages of software source control to the database. Simply control all those text files in SVN or Git like you normally would. This practice is old hat.
  32. Every database artifact goes in to the repository.
  33. Developers need a place to deploy refactorings when they&amp;#x2019;re trying to get their tests to pass. This must be a local database not used by any other team member or system.
  34. If we learn how to refactor databases from Ambler and Sandalage, Liquibase is the tool that makes it easy. It is an XML-based love poem to Scott Ambler.
  35. Liquibase is fundamentally a command-line tool written in Java. It uses JDBC to communicate with the database, and can coexist well in a non-Java shop. I can be invoked from popular open-source build tools and frameworks.
  36. Liquibase is fundamentally a command-line tool written in Java. It uses JDBC to communicate with the database, and can coexist well in a non-Java shop. I can be invoked from popular open-source build tools and frameworks.
  37. Liquibase is fundamentally a command-line tool written in Java. It uses JDBC to communicate with the database, and can coexist well in a non-Java shop. I can be invoked from popular open-source build tools and frameworks.
  38. Liquibase is fundamentally a command-line tool written in Java. It uses JDBC to communicate with the database, and can coexist well in a non-Java shop. I can be invoked from popular open-source build tools and frameworks.
  39. We&amp;#x2019;ll consider three aspects of Liquibase. How it stores the schema, how it interacts with the database, and how to use it in some real-world scenarios.
  40. We&amp;#x2019;ll consider three aspects of Liquibase. How it stores the schema, how it interacts with the database, and how to use it in some real-world scenarios.
  41. We&amp;#x2019;ll consider three aspects of Liquibase. How it stores the schema, how it interacts with the database, and how to use it in some real-world scenarios.
  42. Must we rewrite our SQL in XML? We must. It&amp;#x2019;s painful and unappetizing, but worth it! Also, there&amp;#x2019;s a Grails plugin called Autobase that lets us do it in nice Groovy Builder syntax, which is preferable. We won&amp;#x2019;t address Autobase in detail here, but it&amp;#x2019;s worth looking in to.
  43. Must we rewrite our SQL in XML? We must. It&amp;#x2019;s painful and unappetizing, but worth it! Also, there&amp;#x2019;s a Grails plugin called Autobase that lets us do it in nice Groovy Builder syntax, which is preferable. We won&amp;#x2019;t address Autobase in detail here, but it&amp;#x2019;s worth looking in to.
  44. Must we rewrite our SQL in XML? We must. It&amp;#x2019;s painful and unappetizing, but worth it! Also, there&amp;#x2019;s a Grails plugin called Autobase that lets us do it in nice Groovy Builder syntax, which is preferable. We won&amp;#x2019;t address Autobase in detail here, but it&amp;#x2019;s worth looking in to.
  45. The changelog is a script that builds your schema one DDL statement at a time. Each changeSet is converted into a dialect-specific SQL statement and is executed in the database, then marked as complete in a log table.
  46. Extracts the database&amp;#x2019;s metadata and generates a changelog. This is the first step is getting started on a database that already exists.
  47. Since Liquibase tracks the status of all changesets in the changelog, we&amp;#x2019;ll need to tell it that our newly extracted changelog is in sync with the actual database. This command usually shouldn&amp;#x2019;t be executed except as the second step getting started with the tool.
  48. Plays any new changeSets in the changeLog against the database. This is the statement you&amp;#x2019;ll use the most during evolutionary database development with Liquibase.
  49. Marks the database for a future rollback.
  50. Rolls back changesets to given tag.
  51. Supposed to document the differences between the database and the changelog. I&amp;#x2019;ve not had good luck with this so far against MySQL and SQLServer databases.
  52. Evolutionary Database Development is not controversial among software developers, because we are largely persuaded of the core propositions. Moreover, Liquibase seems like a reasonable tool to help. Now let&amp;#x2019;s talk about some practices to put in place in a brownfield effort.
  53. People are using it, it works, it has literally years of knowledge and business process encoded in it. It&amp;#x2019;s also ugly and outdated, and its schema seems to have been built by the DBA Club after school. But you&amp;#x2019;re replacing it, with Grails...!