SlideShare une entreprise Scribd logo
1  sur  77
The Science of
Database CI/CD
What do we know about it?
Jasmin Fluri
Agenda
About me
Jasmin Fluri
Schaltstelle GmbH
Database Development
Development Process
Automation and Tooling
Continuous Integration
Continuous Delivery
Software Engineering
@jasminfluri
@jasminfluri
jasminfluri
Pipelining
What am I going to talk about?
4
Research Project –
Introducing CI/CD into database
development projects!
5
What we know about CI/CD and
why it is harder for database
development!
At the end of this talk you will know:
- why you should adopt CI/CD in DB
development
- how you start
- and how your team will profit from it!
6
What do we know about
releasing software?
7
DevOps Goal:
We want to ship changes
continuously to get fast and
continuous feedback!
8
High performing teams deploy changes at least once a day!
Source: DevOps Report DORA 2021
9
High performing teams have a low change failure rate!
10
Source: DevOps Report DORA 2021
Why do they recover so much
better from incidents?
11
Small changes = small risk = small possible damage = small feedback
loops
12
Source: NYTimes – The best path to long term success is slow, simple and boring!
What positive effect do small changes have?
13
Small changes have small impact! It’s easy to see
all the elements that are affected!
Small changes only introduce a small risk of
change!
Small changes can more easily be reverted or fixed
when they are faulty.
… so deploying small changes,
often is a good practice to do!
14
… but it’s not common in
database development!
15
What is CI/CD?
16
Software
Delivery
Lifecycle
Plan
Develop Build
Test
Release
Deploy
Feedback
Monitor
Continuous
Delivery
Continuous
Integration
Development
Operations &
Customer
Involvement
Software Delivery
Lifecycle
Developing
Small
Increments
Continuous
(automated)
Integration
and Testing
Continuous Releasing
and automated
Installation
Monitoring
and Feedback
Continuous Delivery != Continuous Deployment
18
CI/CD != DevOps
CI/CD != Agile
19
Agile
• Developing small
increments
• Always having a
runnable version of the
product
20
DevOps CI/CD
• Interconnecting tasks
and processes
• Whole app lifecycle
managed by a single
team
• Service-Infrastructure
• Automation
• Hands-off integration
and deployment
• Fast feedback
• Automated quality
assurance
How does CI/CD for
Applications look like?
21
Developer
Version Control
System
Continuous
Integration
Server
Continuous
Integration
Pipeline
Pushing changes
into Version Control
Trigger pipeline
on commit or
on merge request
execute
1 - Checkout source code
2 - Build and
test of application
3 – Run system tests,
static code analysis
and metrics
4 - Generate reports
and notifications
5 - notify
Continuous Integration
File-based
Development
Packages
can replace old
versions
No state
No order of
changes!
What is special about
database CI/CD?
23
Continuous Integration and
Delivery for DB is more than
using a Database Migration
Tool!
24
Developer
Version Control
System
Continuous
Integration
Server
Continuous
Integration
Pipeline
Pushing changes
into Version Control
Trigger pipeline
on commit or
on merge request
execute
1 - Checkout source code
2 - Build and
test of database
3 – Run system tests,
static code analysis
and metrics
4 - Generate reports
and notifications
5 - notify
Continuous Integration
File-based
Development and
Generated Code
Changes have
an order! Builds are
deployments!
We depend
upon state!
What do we know are
preconditions for good
database CI/CD?
26
Before you start building a database CI/CD pipeline you need…
Static
Code
Analysis
Automated
Tests
Version
Control of
Everything
Database
Migration
Tool
Decoupled
Codebase
27
Version Control
28
… without Version Control
there’s no single source of
truth!
29
You need to store EVERYTHING in version
control!
30
The scary 36.6%
There’s no best practice or
standard of how to version
SQL code! – But there are
some ways that work…
31
Pure File based development isn’t common in database
development
Problem: you often not only want your migration scripts in VCS but also the
DDLs!
DDLs allow you to build a system from scratch fast!
DMLs allow you to migrate to the next version!
32
Database Source Code in Version Control
myproject/
├── …
├── docs/
│ ├── documentation.md
├── db/
│ ├── 0_sequences/
│ ├── 1_tables/
│ ├── 2_mviews/
│ ├── 3_views/
│ ├── 4_packages/
│ └── 5_utils/
├── migrations/
│ ├── scripts/
└── db-tests/
├── packages/
└── data/
DDL
code
Test code
and test data
Sample Project Structure
• DDLs contain the definition of our
database objects
• Migration scripts allow us to migrate to
the next version!
• Test code tests our database logic and
behaviour.
Migration Scripts
The majority of people uses a mix of generating and writing
migration scripts!
34
To be able to do file-based
development for database migration
scripts we need repeatability!
35
What happens if your database scripts are not
repeatable?
Non Repeatable Migration Script
If it fails, we need a new one with the remaining changes (and
corrections)
36
Repeatable Migration Script
If it fails, we alter it, and run it again – it will continue where it failed.
Passive version control
(generating code from the database)
introduces the risk, that we miss
exporting things we changed.
37
Architecture of your VCS
the repository structure and git workflow
The Problem with Feature Branches
Tests on branches are pointless, if they miss
changes made by others!
You cannot test your changes of database applications
properly, when you are using feature branches!
… same thing
applies to
infrastructure
code!
Trunk-based development and Continuous Integration
Integration Pipeline Delivery Pipeline
triggers
if (system = database){
build = deployment;
}
Merging Application Development with Database Development
Working Trunk-based Submodules – Mixing Workflows
43
APP Repository
Gitflow
DB Repository
Trunk Based
DB
Repository
Trunk Based
Submodule
APP & DB
Repository
Trunk Based
How do you review code when
you do trunk-based
development?
44
Daily struggle to wait for code reviews of your feature
branches…
45
«But we don’t have the time to do pair programming»
46
Static Code Analysis
47
To be able to do code reviews, you need
standards! Those standards should be enforced
automatically!
48
Database Migration Tool
49
Datenbank Schema Evolution
Database Version 1 Database Version 2
Initial DDL
DDL & DML
Database Version 3
DDL & DML …
Application Repository
Database
V00__baseline.sql
V01__revision01.sql
V02__revision02.sql
V03__revision03.sql
V04__revision04.sql
V05__revision05.sql
V06__revision06.sql
V07__revision07.sql
V08__revision08.sql
V09__revision09.sql
Migrations
Utilities
R_synonyms.sql R_grants.sql R_checks.sql
Database Schema Evolution - Migration Based Approach
Database Migration Tools
52
The scary 14.7%
Changeset formats – just use SQL!
53
The scary 43.7%
Automated Database Tests
54
Our research showed that projects
without automated testing spend
around 25% of their teams capacity
for manual testing.
55
56
Unit Testing in your
Application
- API Tests
- Integration tests
- Unit Tests of the
application backend
Testing Tools
Unit Testing in your
Database
- Unit Tests
- Integration tests
Decoupled Codebase
58
What happens when release cycles are coupled to other
teams (or components) ?
59
Team A
Team B
Team C
Release 1 Release 2 Release 3 Release 4
This is not Continuous Delivery!
Database Access – Access Layer
60
Why is a versioned API
important?
61
Application
A
Application
B
Application
C
Service Layer (Database)
Infrastructure
provide
Services
consume
Services
Databases are Services! Data Services!
Because… when the
database changes…
… applications need to
change as well if we
don’t have a versioned
access!
Coupling of release
activities must be
eliminated!
63
Application A
Service XY
Infrastructure
provide
Services
consume
Services
Version 1 Version 2 Version 3
Team A
Version 4
Team B
Teams want to work independently and continuously!
64
Application A Application B Application C
Service XY (Database)
Infrastructure
provide
Services
consume
Services
Service Delivery Organisation
Version 1 Version 2 Version 3
This is even more important,
when we are shipping small
changes continuously!
Now we have all preconditions
to build a CI Pipeline!
Continuous
Integration &
Release
Pipeline
67
Development Environment
Version Control
Pipelines
Infrastructure
New Functionality
develops
pushes
CI Server
CI
Database
triggers
starts
Static
Code
Analysis
Check
out
Code
Deploy
SQL
Code
Unit
Tests
System
Tests
Set Release
Number
End of
Release
Backu
p
Developer
Artefact Repository
Push
Artefact
Deployment
Artefact
New Commit
on Main
Branch
Release Pipeline
Static
Code
Analysis
Tool
Integration
Pipeline
End of
Integration
Environment - Setup
68
Version
Control
Server
Continuous
Integration
Server
Development
Environment
Test
Environment
Production
Environment
Developer
Localhost
DDL Export
Scripts /
Functionality
Artefact
Repository
Database
Schema
Migration Tool
CI
Environment
Static Code
Analysis Tool
Production
Pipeline
Test
Pipeline
Integration
Pipeline
Push Pull
Export
Push
Migration
Scripts and
DDLs
Trigger
Clone
Trigger
Execute
But why do we need CI/CD?
69
Not automating integration and
deployments is a change preventer!
70
What are results of our
research?
71
Introducing CI/CD into a database development
project…
… increased the amount of deployments by over 5x!
More deployments means more testing!
More deployments also means less risk!
72
Introducing CI/CD into a database development
project…
… decreased the amount of failed deployments by
over 75%!
If it hurts, do it more often!
Automation introduces a repeatable process, without human
interventions!
73
Introducing CI/CD into a database development
project…
… decreased cognitive load of the
developers!
 Focus now lies on the development of functionality, not in
manually deploying changes and troubleshooting!
74
Introducing CI/CD into a database development
project…
… did not change the lead time for changes!
All participating projects used fixed release windows for
deploying changes into production!
Fixed release windows = Fixed lead time!
75
@jasminfluri
@jasminfluri
jasminfluri
Thank you for your time!
What questions do you have?
Ressources / References
Accelerate Book : https://itrevolution.com/book/accelerate/
DORA 2022 : https://cloud.google.com/blog/products/devops-sre/dora-2022-accelerate-state-of-
devops-report-now-out
DORA 2021 : https://services.google.com/fh/files/misc/state-of-devops-2021.pdf
The best path to long term success is slow : https://www.nytimes.com/2017/07/31/your-money/the-
best-path-to-long-term-change-is-slow-simple-and-boring.html
Martin Fowler : Continuous Integration
https://www.martinfowler.com/articles/continuousIntegration.htm
77

Contenu connexe

Tendances

Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflixaspyker
 
和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab WorkflowChen Cheng-Wei
 
Case Study on agile scrum methodology on shopping cart
Case Study on agile scrum methodology on shopping cartCase Study on agile scrum methodology on shopping cart
Case Study on agile scrum methodology on shopping cartAbdullah Raza
 
Agile software development
Agile software developmentAgile software development
Agile software developmentMat Siems
 
Microservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsMicroservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsRed Hat Developers
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformDevOps Indonesia
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactAraf Karsh Hamid
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
Introduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementIntroduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementDan Chuparkoff
 
Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleOliver Lemm
 
Everything as Code
Everything as CodeEverything as Code
Everything as CodeWayne Walls
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsAraf Karsh Hamid
 
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesNikhil Thomas
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101Hazzim Anaya
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for BeginnersNebulaworks
 

Tendances (20)

Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow
 
Case Study on agile scrum methodology on shopping cart
Case Study on agile scrum methodology on shopping cartCase Study on agile scrum methodology on shopping cart
Case Study on agile scrum methodology on shopping cart
 
Agile software development
Agile software developmentAgile software development
Agile software development
 
Microservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsMicroservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and Jenkins
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud Platform
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Introduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementIntroduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project Management
 
Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets Oracle
 
Everything as Code
Everything as CodeEverything as Code
Everything as Code
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
 
Azure DevOps - Azure Guatemala Meetup
Azure DevOps - Azure Guatemala MeetupAzure DevOps - Azure Guatemala Meetup
Azure DevOps - Azure Guatemala Meetup
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 

Similaire à The Science of database CICD - UKOUG Breakthrough

Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CDJasmin Fluri
 
Advanced Techniques for Initiating the DevOps Journey
Advanced Techniques for Initiating the DevOps JourneyAdvanced Techniques for Initiating the DevOps Journey
Advanced Techniques for Initiating the DevOps JourneyCA Technologies
 
A Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesA Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesIBM UrbanCode Products
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applicationsSunil Dalal
 
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Emerasoft, solutions to collaborate
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...Simplilearn
 
Continuous Everything
Continuous EverythingContinuous Everything
Continuous EverythingAndrea Tino
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systemsLen Bass
 
Building an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineBuilding an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineGrant Fritchey
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meetingSergii Shmarkatiuk
 
TheTricky Bits of Deployment Automation
TheTricky Bits of Deployment Automation TheTricky Bits of Deployment Automation
TheTricky Bits of Deployment Automation IBM UrbanCode Products
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesEduardo Piairo
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
SplunkLive! London 2016 Splunk for Devops
SplunkLive! London 2016 Splunk for DevopsSplunkLive! London 2016 Splunk for Devops
SplunkLive! London 2016 Splunk for DevopsSplunk
 
Our Journey To Continuous Delivery
Our Journey To Continuous DeliveryOur Journey To Continuous Delivery
Our Journey To Continuous DeliveryRobert Mircea
 
Continuous Integration and Continuous Delivery on Azure
Continuous Integration and Continuous Delivery on AzureContinuous Integration and Continuous Delivery on Azure
Continuous Integration and Continuous Delivery on AzureCitiusTech
 
Geek Sync I In Database Automation We Trust
Geek Sync I In Database Automation We TrustGeek Sync I In Database Automation We Trust
Geek Sync I In Database Automation We TrustIDERA Software
 
Road to database automation: database source control
Road to database automation: database source controlRoad to database automation: database source control
Road to database automation: database source controlEduardo Piairo
 

Similaire à The Science of database CICD - UKOUG Breakthrough (20)

Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
 
Advanced Techniques for Initiating the DevOps Journey
Advanced Techniques for Initiating the DevOps JourneyAdvanced Techniques for Initiating the DevOps Journey
Advanced Techniques for Initiating the DevOps Journey
 
A Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesA Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for Databases
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
Webinar: "DBMaestro: Database Enforced Change Management (DECM) tool"
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
 
Continuous Everything
Continuous EverythingContinuous Everything
Continuous Everything
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systems
 
Building an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineBuilding an Automated Database Deployment Pipeline
Building an Automated Database Deployment Pipeline
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meeting
 
TheTricky Bits of Deployment Automation
TheTricky Bits of Deployment Automation TheTricky Bits of Deployment Automation
TheTricky Bits of Deployment Automation
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
SplunkLive! London 2016 Splunk for Devops
SplunkLive! London 2016 Splunk for DevopsSplunkLive! London 2016 Splunk for Devops
SplunkLive! London 2016 Splunk for Devops
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Our Journey To Continuous Delivery
Our Journey To Continuous DeliveryOur Journey To Continuous Delivery
Our Journey To Continuous Delivery
 
Continuous Integration and Continuous Delivery on Azure
Continuous Integration and Continuous Delivery on AzureContinuous Integration and Continuous Delivery on Azure
Continuous Integration and Continuous Delivery on Azure
 
Geek Sync I In Database Automation We Trust
Geek Sync I In Database Automation We TrustGeek Sync I In Database Automation We Trust
Geek Sync I In Database Automation We Trust
 
Road to database automation: database source control
Road to database automation: database source controlRoad to database automation: database source control
Road to database automation: database source control
 

Plus de Jasmin Fluri

Testing your data mart - how to start | DOAG 2021
Testing your data mart - how to start | DOAG 2021Testing your data mart - how to start | DOAG 2021
Testing your data mart - how to start | DOAG 2021Jasmin Fluri
 
Myth Busting - NoSQL vs SQL Data Stores - Guild42
Myth Busting - NoSQL vs SQL Data Stores - Guild42Myth Busting - NoSQL vs SQL Data Stores - Guild42
Myth Busting - NoSQL vs SQL Data Stores - Guild42Jasmin Fluri
 
Myth Busting - NoSQL vs SQL Data Stores - Video Edition
Myth Busting - NoSQL vs SQL Data Stores - Video EditionMyth Busting - NoSQL vs SQL Data Stores - Video Edition
Myth Busting - NoSQL vs SQL Data Stores - Video EditionJasmin Fluri
 
Myth Busting - NoSQL vs SQL Data Stores
Myth Busting - NoSQL vs SQL Data StoresMyth Busting - NoSQL vs SQL Data Stores
Myth Busting - NoSQL vs SQL Data StoresJasmin Fluri
 
AskTom Office Hours about Database Migrations
AskTom Office Hours about Database MigrationsAskTom Office Hours about Database Migrations
AskTom Office Hours about Database MigrationsJasmin Fluri
 
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...Jasmin Fluri
 
Prediction of Skierdays With Oracle Data Mining - OGB EMEA Edition
Prediction of Skierdays With Oracle Data Mining - OGB EMEA EditionPrediction of Skierdays With Oracle Data Mining - OGB EMEA Edition
Prediction of Skierdays With Oracle Data Mining - OGB EMEA EditionJasmin Fluri
 
Prediction of skier days with Oracle Data Mining
Prediction of skier days with Oracle Data MiningPrediction of skier days with Oracle Data Mining
Prediction of skier days with Oracle Data MiningJasmin Fluri
 
Learnings about Automated deployments of Database Applications
Learnings about Automated deployments of Database ApplicationsLearnings about Automated deployments of Database Applications
Learnings about Automated deployments of Database ApplicationsJasmin Fluri
 
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019Jasmin Fluri
 

Plus de Jasmin Fluri (10)

Testing your data mart - how to start | DOAG 2021
Testing your data mart - how to start | DOAG 2021Testing your data mart - how to start | DOAG 2021
Testing your data mart - how to start | DOAG 2021
 
Myth Busting - NoSQL vs SQL Data Stores - Guild42
Myth Busting - NoSQL vs SQL Data Stores - Guild42Myth Busting - NoSQL vs SQL Data Stores - Guild42
Myth Busting - NoSQL vs SQL Data Stores - Guild42
 
Myth Busting - NoSQL vs SQL Data Stores - Video Edition
Myth Busting - NoSQL vs SQL Data Stores - Video EditionMyth Busting - NoSQL vs SQL Data Stores - Video Edition
Myth Busting - NoSQL vs SQL Data Stores - Video Edition
 
Myth Busting - NoSQL vs SQL Data Stores
Myth Busting - NoSQL vs SQL Data StoresMyth Busting - NoSQL vs SQL Data Stores
Myth Busting - NoSQL vs SQL Data Stores
 
AskTom Office Hours about Database Migrations
AskTom Office Hours about Database MigrationsAskTom Office Hours about Database Migrations
AskTom Office Hours about Database Migrations
 
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...
Prediction of Skierdays with Oracle Data Mining - Analytics and Data Techcast...
 
Prediction of Skierdays With Oracle Data Mining - OGB EMEA Edition
Prediction of Skierdays With Oracle Data Mining - OGB EMEA EditionPrediction of Skierdays With Oracle Data Mining - OGB EMEA Edition
Prediction of Skierdays With Oracle Data Mining - OGB EMEA Edition
 
Prediction of skier days with Oracle Data Mining
Prediction of skier days with Oracle Data MiningPrediction of skier days with Oracle Data Mining
Prediction of skier days with Oracle Data Mining
 
Learnings about Automated deployments of Database Applications
Learnings about Automated deployments of Database ApplicationsLearnings about Automated deployments of Database Applications
Learnings about Automated deployments of Database Applications
 
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019
Automated delivery in the data warehouse SOUG Day Romandie - 21 May 2019
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

The Science of database CICD - UKOUG Breakthrough

Notes de l'éditeur

  1. What are we going to see today? First we will have a look at what are preconditions of database schema evolutions or database migrations? Second we will explore how database deployments or schema migrations are conducted And third we will have time for questions and then proceed with a hands-on lab.
  2. Now If you have a version control system you will need to think about a directory structure of your repository. The main thing when it comes to structuring is storing production code separate from test code and test data. There are a couple of things to consider: Store the ddl of all of your objects per object type for easier navigation Store migration scripts separately Store tests and test data separate from production code Use the same naming for test packages and production packages to simplify navigation Use one test package per productive package that is tested Test data and tests should be stored separate from each other to ensure reusability of the test data in different test contexts Now that we have our directory structure we can have a look at our source code workflow.
  3. Let’s have a look at the first precondition. The repository structure of our version control repository like git, and the workflow that we need to set up in our development process.
  4. So The problem with long-running feature branches is that you can't test the commits in the right order. In both database and infrastructure development, it often depends on which patch or change is applied first before another is applied. If you have long running feature branches, you don't know what changes have been made to your application in the meantime. Therefore, testing is not very efficient or safe.
  5. Well, Continuous Integration works best for databases and for infrastructure code when version control is trunk-based. Because many changes to database applications cannot be tested properly if feature branches are used! The same is true for infrastructure code. So if you are doing either infrastructure provisioning or database engineering, you should develop trunk-based. Let’s have a look why!
  6. If we look at how trunk-based development and continuous integration work, the continuous integration pipeline is triggered with each commit on the mainline. CI is therefore executed when a new commit is made and starts: Migration scripts. Post-migration scripts such as recompiling, restoring synonyms, creating permissions. Tests are executed Metrics are calculated Static code analysis is performed The delivery process can then be started manually and only performs migrations and post-migration scripts.
  7. Now there are two different approaches to implementing trunk-based development. Either you start completely trunk-based as shown here on the left, so that the whole application including the database is developed trunk-based. This requires a big amount of pair programming and putting changes of small size into production at a time. Or you work in Git with submodules, and split the application and the database into two repositories. The database repository is then included as a submodule in the application repository so that the CI/CD pipeline has access to both. The application part can be then developed for example with a gitflow workflow and the database trunk based. Database changes would then be deployed, when a new release of the application is deployed. This is easier to implement when a versioned API above the database exists that decouples the two parts.
  8. If I tell people that they should to pair programming, I often hear that they don’t have time for pair programming, because they have lot’s of stuff to do. The thinking is that they are faster if they don’t do pair or mob programming. But the nature of things is, that you usually have dependencies in development. Those can be knowledge gaps that you have, where you need support from a colleague, or access dependencies. As an example the lead time is shown of the yellow task that needs both developers. It is a lot longer, than if those two would just sit together and do it in pair programming. With the side effect that if they would do pair programming, they would also share knowledge about the feature at the same time. So they would be faster and also smarter afterwards.
  9. A database migration tool helps us migrate the database schema from one state to another. This means we start with an initial DDL script that builds database version 1. From here on we will always have migrations that transform our database into the next version. And our database migration tool tracks those migrations, checks if a migration script was already run against a database and if not, installs the migration. This way we can apply changes to our database like adding tables, adding foreign keys, removing data or refactoring the database with new migration scripts.
  10. The tool that we are going to see today is flyway that follows a migration based approach. Database migration files are stored as a series of files with continuous enumeration, telling the tool in which order the scripts need to be run, to succeed. Usually there are migraiton scripts that run only once against a database instance and we have so called repeatable scripts, that run after every migration. Those scripts can set for example synonyms that might get lost during migrations or grants or create database views and procedures that don’t include persistence or state. Also recompilation script are quite common repeatable scripts, that check if all the database objects are still in a valid state and can be executed.
  11. The third precondition is that we need to test our database.
  12. If you have a java Application you can use jUnit and the jUnit extension DBUnit to write database integration tests or also database unit tests. The problem here is, that you need a running database instance to run the tests against, so they are more integration tests than they are unit tests, because you also test the interaction of the two systems with every test and cannot run them without having the database present.
  13. We have primarily two kinds of teams, teams that provide services to others and teams that consume services from other teams. For application teams or software delivery teams it is especially important to have a service layer abstracting the infrastructure, to make them independent and allowing them to build and run their application independently of any other team. That’s the main goal of DevOps – You build it, you run it. So everything a team builds, they can also independently run in production. There’s no hand-off to an operations team that takes over production, the application teams does everything on its own. So, Especially above the infrastructure layer, a service layer is essential so that application teams can use them. These interfaces should be made available in different versions whenever possible.
  14. Versioning looks something like this. Our service XY provides several versions of its API. This allows the consuming applications to change the version individually if they either want the benefit of new functionalities or if they want to invest time in the lifecycle of the application and switch to the latest service version. A very Important aspect is: Applications should be allowed to decide for themselves when they switch to newer versions of an API. Forcing applications to do this synchronously undermines the prioritization within an application team of what is important to them. It may be enough for a team to use functionalities from version 1, because they don’t require new functionalities of newer verisons.