SlideShare une entreprise Scribd logo
1  sur  27
DevOps, Continuous
Integration &
Database Lifecycle
Management
By : Muhammad Hashir
Issues with traditional Database
Development
1. Data is hard to manage. You can overwrite and redeploy your code from scratch every time, but
the same cannot be done with data. Databases have existing data which needs to be persisted
and hence it cannot be wiped off and recreated during deployments – just like the code.
2. Having no Source Control for your database objects implies that there is no versioning information
available for your database changes. Production is the version and system of truth. This makes it
almost impossible to unit test your changes and automate your deployments.
3. Developers must spend a lot of time in creating the DML scripts. They also need to account for the
tedious rollback scripts, in case the overall deployment had to be rolled back. The Database
Administrator must spend a lot of time in executing scripts against multiple environments.
4. Removing manual work and inefficiencies in your database development process is one of the
reasons why organizations are moving towards automating their database deployments.
DATABASE Continuous Integration LIFECYCLE MANAGEMENT
OVERVIEW
Coding Unit Testing
Static Code
Analysis
Source Control
Continuous
Integration
Continuous
Deployment
SHIFT LEFT – Catch issues as early as possible
Static Code Analyzer
• Free and No Installation required
• Need to have VIEW SERVER STATE or
VIEW DATABASE STATE permission
• SQL Cop has a set of predefined rules
to identify anti-patterns for database
development
1. SQLCOP
• Continuous Inspection of Code Quality
• Identify Code Smells, Bugs and
Vulnerabilities
• Analyzers for 20+ Programming Languages
• DevOps Integration
• Reject Check-in when Quality Gate not met
2. Sonar Cube
Database Deployment
Approaches
Source Control is the system of truth
COMPARE
SSDT SCHEMA
COMPARE
GENERATE
EXECUTE
DIFFERENCE SCRIPT
DATABASE PROJECT/
DACPAC
1. STATE BASED APPROACH DACPAC is a self-contained
deployment file which is used for
deploying SQL Server objects to an
instance of SQL Server. You can
also think of DACPAC to be like a
database snapshot file, which can
serve as the in-memory
representation of database objects
and can be stored for maintaining
version history.
When the DACPAC is deployed, it
uses the information in the
DACPAC file as the source database
schema. It compares this with the
defined target to generate an
appropriate change script, which is
then executed against the target to
sync up both the environments.
Database is the system of truth
STATE 1 STATE 2 STATE 3 STATE N
Migration 1 Migration 2 Migration N
2. Migration BASED APPROACH
STATE BASED APPROACH
1. System of Truth is the Source Code
2. Suited for frequent database changes
3. Suited for large sized teams
4. Source Code contains the current
state of the database
5. Less control on the migration script
6. Complex refactoring might take
multiple steps
MIGRATION BASED APPROACH
1. System of Truth is the Database
2. Suited for infrequent database changes
3. Suited for small sized teams
4. Must maintain a long list of migration
scripts within the source control.
5. More fine grain control on the
migration script
6. Complex refactoring can be handled by
a single script
DATABASE DRIFTS
Any change to the database schema or reference data
that was made directly in the database environment,
outside of the normal automated delivery pipeline.
Ensure that all migrations are idempotent – meaning that
running a script more than once has no additional impact.
 Renaming a Column/Table/Stored Procedure/ View/ Function
 Dropping a Column/Table
 Remove a Stored Procedure/ View/ Function
 Moving a Column from one table
 Adding a Column/Table/Stored Procedure/ View/ Function
Non-Breaking Database Change
Breaking Database Change
BACKWARDS COMPATIBILITY
Expand
Transition
Phase
Contract
Initial Refactoring
is applied
Perform Cleanup to
complete the refactoring
Data is migrated
EXPAND AND CONTRACT PATTERN
SQL Server Data Tools in
Visual Studio 2017
Red gate Data Tools in Visual Studio 2017
1. Ready Roll Core: allows you to develop, source control, and safely automate deployments of
database changes alongside application changes. Ready Roll Core is available in the
Enterprise edition of Visual Studio 2017.
2. SQL Prompt Core: offers advanced code completion for SQL. SQL Prompt Core is available in
the Enterprise edition of Visual Studio 2017.
3. SQL Search: lets you find SQL objects fast and easily explore across databases. SQL Search is
available in all editions of Visual Studio 2017.
VERSION
CONTROL
DISCONNECTED
DATABASE
DEVELOPMENT
DECLARATIVE
APPROACH
DACPAC
DEPLOPYMENTS
CODE EDITING
EXPERIENCE
SCHEMA & DATA
COMPARE
SQL SERVER
DATA TOOLS
SSDT INSTALLATION IN VISUAL STUDIO 2017
REDGATE
READYROLL
INCREMENTAL
CHANGE
SHIFT LEFT
MORE CONTROL
ON MIGRATION
SCRIPT
HYBRID
APPROACH
PROGRAMMABLE
OBJECTS
OFFLINE
SCHEMA MODEL
READYROLL INSTALLATION IN VISUAL STUDIO 2017
Flyway is free and open source.
Flyway facilitates the Automatic Deployment of database changes.
Flyway creates a table name ‘schema_version‘ in your database.
Flyway supports number of databases – Oracle, SQL Server, MySQL,
PostgreSQL, MariaDB, SQLite, Redshift and more.
• Changes made to same file causes Merge
Conflict.
MAIN
BRANCH 1 BRANCH 2
• Conflicts are caused by merge issues
because of long running feature branches.
Resolving Merge Conflicts is Error Prone and Time Consuming.
• Longer running features has the
potential to create Merge issues.
File1.cs File2.cs
7 Changes 5 Changes
Reverse Integration
BRANCHING STRATEGY
FEATURE FLAGS
• Potential alternative to maintaining multiple feature
branches.
• Reduces the need for constant branching and
merging.
• Enables releases with unfinished features at no risk.
Azure DevOps Release
CODE BUILD INTEGRATE RELEASE DEPLOY
TEST
Continuous Integration
Continuous Delivery
Continuous Deployment
RELEASE PIPELINE
SOURCE CONTROL
DEVELOPMENT CONTINUOUS INTEGRATION
BUILD
TEST
Feedback Mechanism
Trigger
CODE STAGING PRODUCTION
CONTINUOUS DELIVERY
CONTINUOUS DEPLOYMENT
BUILD
CODE STAGING PRODUCTION
BUILD
Auto Auto
Auto Auto Auto
Manual
RESOURCES
• Continuous Integration with SQL Server Data Tools in Visual Studio 2017
• Database Static Code Analysis using SQL Cop
• Managing your Technical Debt using SonarQube
• Continuous Integration, Continuous Delivery and Continuous Deployment

Contenu connexe

Tendances

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gatewayChengHui Weng
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesNATS
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewJames Falkner
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Janusz Nowak
 
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...Adrian Todorov
 
Mastering Azure Monitor
Mastering Azure MonitorMastering Azure Monitor
Mastering Azure MonitorRichard Conway
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton Araf Karsh Hamid
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 

Tendances (20)

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gateway
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices Architectures
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
 
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...
 
Monitor Cloud Resources using Alerts & Insights
Monitor Cloud Resources using Alerts & InsightsMonitor Cloud Resources using Alerts & Insights
Monitor Cloud Resources using Alerts & Insights
 
Mastering Azure Monitor
Mastering Azure MonitorMastering Azure Monitor
Mastering Azure Monitor
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
Lift & Shift to Azure
Lift & Shift to AzureLift & Shift to Azure
Lift & Shift to Azure
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
SRE & Kubernetes
SRE & KubernetesSRE & Kubernetes
SRE & Kubernetes
 

Similaire à Database CI/CD Pipeline

KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBATobias Koprowski
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalSarah Dutkiewicz
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql ServerUmesh Kumar
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part isqlserver.co.il
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiAlex Tumanoff
 
Delivering changes for databases and applications
Delivering changes for databases and applicationsDelivering changes for databases and applications
Delivering changes for databases and applicationsEduardo Piairo
 
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...Embarcadero Technologies
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deploymentrsnarayanan
 
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
 
Continuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkContinuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkb0ris_1
 
Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Volha Banadyseva
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for DevelopersSarah Dutkiewicz
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Red Gate Software
 
Using MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexUsing MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexwebhostingguy
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase
 

Similaire à Database CI/CD Pipeline (20)

KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data Professional
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql Server
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen Nedaskivskyi
 
Delivering changes for databases and applications
Delivering changes for databases and applicationsDelivering changes for databases and applications
Delivering changes for databases and applications
 
SSDT unleashed
SSDT unleashedSSDT unleashed
SSDT unleashed
 
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...
DB Change Manager XE6 Datasheet - The Essential Schema and Data Synchronizati...
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deployment
 
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...
 
Migrate SQL Workloads to Azure
Migrate SQL Workloads to AzureMigrate SQL Workloads to Azure
Migrate SQL Workloads to Azure
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 
Continuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 frameworkContinuous DB migration based on carbon5 framework
Continuous DB migration based on carbon5 framework
 
Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!Борис Трофимов. Continuous Database migration-это просто!
Борис Трофимов. Continuous Database migration-это просто!
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control
 
Using MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlexUsing MS-SQL Server with Visual DataFlex
Using MS-SQL Server with Visual DataFlex
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
 

Dernier

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Dernier (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Database CI/CD Pipeline

  • 1. DevOps, Continuous Integration & Database Lifecycle Management By : Muhammad Hashir
  • 2. Issues with traditional Database Development 1. Data is hard to manage. You can overwrite and redeploy your code from scratch every time, but the same cannot be done with data. Databases have existing data which needs to be persisted and hence it cannot be wiped off and recreated during deployments – just like the code. 2. Having no Source Control for your database objects implies that there is no versioning information available for your database changes. Production is the version and system of truth. This makes it almost impossible to unit test your changes and automate your deployments. 3. Developers must spend a lot of time in creating the DML scripts. They also need to account for the tedious rollback scripts, in case the overall deployment had to be rolled back. The Database Administrator must spend a lot of time in executing scripts against multiple environments. 4. Removing manual work and inefficiencies in your database development process is one of the reasons why organizations are moving towards automating their database deployments.
  • 3. DATABASE Continuous Integration LIFECYCLE MANAGEMENT OVERVIEW Coding Unit Testing Static Code Analysis Source Control Continuous Integration Continuous Deployment SHIFT LEFT – Catch issues as early as possible
  • 5. • Free and No Installation required • Need to have VIEW SERVER STATE or VIEW DATABASE STATE permission • SQL Cop has a set of predefined rules to identify anti-patterns for database development 1. SQLCOP
  • 6. • Continuous Inspection of Code Quality • Identify Code Smells, Bugs and Vulnerabilities • Analyzers for 20+ Programming Languages • DevOps Integration • Reject Check-in when Quality Gate not met 2. Sonar Cube
  • 8. Source Control is the system of truth COMPARE SSDT SCHEMA COMPARE GENERATE EXECUTE DIFFERENCE SCRIPT DATABASE PROJECT/ DACPAC 1. STATE BASED APPROACH DACPAC is a self-contained deployment file which is used for deploying SQL Server objects to an instance of SQL Server. You can also think of DACPAC to be like a database snapshot file, which can serve as the in-memory representation of database objects and can be stored for maintaining version history. When the DACPAC is deployed, it uses the information in the DACPAC file as the source database schema. It compares this with the defined target to generate an appropriate change script, which is then executed against the target to sync up both the environments.
  • 9. Database is the system of truth STATE 1 STATE 2 STATE 3 STATE N Migration 1 Migration 2 Migration N 2. Migration BASED APPROACH
  • 10. STATE BASED APPROACH 1. System of Truth is the Source Code 2. Suited for frequent database changes 3. Suited for large sized teams 4. Source Code contains the current state of the database 5. Less control on the migration script 6. Complex refactoring might take multiple steps MIGRATION BASED APPROACH 1. System of Truth is the Database 2. Suited for infrequent database changes 3. Suited for small sized teams 4. Must maintain a long list of migration scripts within the source control. 5. More fine grain control on the migration script 6. Complex refactoring can be handled by a single script
  • 11. DATABASE DRIFTS Any change to the database schema or reference data that was made directly in the database environment, outside of the normal automated delivery pipeline. Ensure that all migrations are idempotent – meaning that running a script more than once has no additional impact.
  • 12.  Renaming a Column/Table/Stored Procedure/ View/ Function  Dropping a Column/Table  Remove a Stored Procedure/ View/ Function  Moving a Column from one table  Adding a Column/Table/Stored Procedure/ View/ Function Non-Breaking Database Change Breaking Database Change BACKWARDS COMPATIBILITY
  • 13. Expand Transition Phase Contract Initial Refactoring is applied Perform Cleanup to complete the refactoring Data is migrated EXPAND AND CONTRACT PATTERN
  • 14. SQL Server Data Tools in Visual Studio 2017
  • 15. Red gate Data Tools in Visual Studio 2017 1. Ready Roll Core: allows you to develop, source control, and safely automate deployments of database changes alongside application changes. Ready Roll Core is available in the Enterprise edition of Visual Studio 2017. 2. SQL Prompt Core: offers advanced code completion for SQL. SQL Prompt Core is available in the Enterprise edition of Visual Studio 2017. 3. SQL Search: lets you find SQL objects fast and easily explore across databases. SQL Search is available in all editions of Visual Studio 2017.
  • 17. SSDT INSTALLATION IN VISUAL STUDIO 2017
  • 18. REDGATE READYROLL INCREMENTAL CHANGE SHIFT LEFT MORE CONTROL ON MIGRATION SCRIPT HYBRID APPROACH PROGRAMMABLE OBJECTS OFFLINE SCHEMA MODEL
  • 19. READYROLL INSTALLATION IN VISUAL STUDIO 2017
  • 20. Flyway is free and open source. Flyway facilitates the Automatic Deployment of database changes. Flyway creates a table name ‘schema_version‘ in your database. Flyway supports number of databases – Oracle, SQL Server, MySQL, PostgreSQL, MariaDB, SQLite, Redshift and more.
  • 21. • Changes made to same file causes Merge Conflict. MAIN BRANCH 1 BRANCH 2 • Conflicts are caused by merge issues because of long running feature branches. Resolving Merge Conflicts is Error Prone and Time Consuming. • Longer running features has the potential to create Merge issues. File1.cs File2.cs 7 Changes 5 Changes Reverse Integration BRANCHING STRATEGY
  • 22. FEATURE FLAGS • Potential alternative to maintaining multiple feature branches. • Reduces the need for constant branching and merging. • Enables releases with unfinished features at no risk.
  • 24. CODE BUILD INTEGRATE RELEASE DEPLOY TEST Continuous Integration Continuous Delivery Continuous Deployment RELEASE PIPELINE
  • 25. SOURCE CONTROL DEVELOPMENT CONTINUOUS INTEGRATION BUILD TEST Feedback Mechanism Trigger
  • 26. CODE STAGING PRODUCTION CONTINUOUS DELIVERY CONTINUOUS DEPLOYMENT BUILD CODE STAGING PRODUCTION BUILD Auto Auto Auto Auto Auto Manual
  • 27. RESOURCES • Continuous Integration with SQL Server Data Tools in Visual Studio 2017 • Database Static Code Analysis using SQL Cop • Managing your Technical Debt using SonarQube • Continuous Integration, Continuous Delivery and Continuous Deployment