SlideShare una empresa de Scribd logo
1 de 38
Get Your Database 
Under Control 
Steve Jones 
Red Gate Software
Goals 
• Understand the value of version/source control 
for databases 
• Learn the tools, standards, patterns and best 
practices needed to manage a database from 
source control 
• Identify the necessary flow within a team needed 
to develop a database with source control
Get in touch 
Steve Jones 
www.voiceofthedba.com 
sjones@sqlservercentral.com 
@way0utwest
How many of you use version control for 
your application code? 
C#, ASP.NET, Javascript, VB.NET, etc.
How many of you use version control for 
your application code? 
database
Developers who refuse to use source/version 
control should be fired, simple as that.
Isn’t this too much trouble for my crappy 
experimental program?
Use source control because neither you 
nor your developers are perfect.
There are no excuses where 
you should not use it.
If it’s not in source control, 
it doesn’t exist.
“…your database should always 
be under source control right 
next to your application code.”
Reducing Risk
You’re using version control
You’re using version control
Use Something
Demo 
Getting started with databases in VCS
Additional Reasons for Source Control 
• Backup & Restore 
• Undo 
• Audit changes 
• Sandbox 
• Branching/Merging
Rules for Database Development 
Never use a shared database for development. 
Always Have a Single, Authoritative Source 
For Your Schema. 
Always Version Your Database.
The Ideal 
• Each developer has a 
dedicated environment with 
a copy of the schema and 
minimal data. 
• A shared integration environment where all 
developers’ changes are merged, available 
for developer testing.
Patterns and Practices 
• Get all your code 
– Object DDL 
– Assembly code 
– Security grants and revokes 
– Database configuration settings 
– Jobs for your application 
– Lookup data
Patterns and Practices 
• Commit Early, Commit Often 
• Use meaningful comments. Why, not what. 
• Check for changes often 
• Use common names and code patterns 
• Use tools 
• Branch Rarely
Teamwork
Teamwork 
• Communication 
o Team members need to be aware of (easily) 
what others are doing. 
• Coordination 
o Teams need to work in a way that 
complements each other.
Teamwork 
• Communication 
o Review each other’s code as you refactor 
o Share knowledge 
o Coordination 
o Decide on common code styles and names 
o And …
Teach
Demo 
The flow within teams
Reasons to Branch 
• Release 
• Hot Fixes 
• New Development 
• Integration 
• Feature set
Reasons to Branch 
• Release 
• Hot Fixes 
• New Development 
• Integration 
• Feature set
Demo 
Branching
Best Practices 
• Use version control for all code (including tests) 
• Commit early, commit often 
• Use tools 
o If it’s hard, people don’t do it 
• Train people 
• Build often
Automation
Automation 
Deployment 
package
deployment package 
1 
2 
3 
FAI 
L 
Development
Goals 
• Understand the value of version/source control 
for databases 
• Learn the tools, standards, patterns and best 
practices needed to manage a database from 
source control 
• Identify the necessary flow within a team needed 
to develop a database with source control
Thanks for coming 
www.voiceofthedba.com 
sjones@sqlservercentral.com 
@way0utwest 
Want to try the tools you’ve just 
seen? Come to our Hands-on Labs
References 
• http://stackoverflow.com/questions/115369/do-you-use-source-control-for-your- 
database-items 
• http://www.codinghorror.com/blog/archives/001050.html 
• http://www.codinghorror.com/blog/2008/02/get-your-database-under-version- 
control.html 
• http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLServerData 
bases.aspx 
• http://odetocode.com/blogs/scott/archive/2008/01/30/three-rules-for-database- 
work.aspx 
• Check in early, check in often - 
http://www.codinghorror.com/blog/2008/08/check-in-early-check-in-often. 
html 
• http://betterexplained.com/articles/a-visual-guide-to-version-control/
Credits 
• https://www.flickr.com/photos/doug88888/8 
349818088/in/photostream/ 
• https://www.flickr.com/photos/8525214@N 
06/5132974421

Más contenido relacionado

La actualidad más candente

Static Analysis Primer
Static Analysis PrimerStatic Analysis Primer
Static Analysis Primer
Coverity
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
Stephen Ritchie
 
David Day - QA Developer - Resume
David Day - QA Developer - ResumeDavid Day - QA Developer - Resume
David Day - QA Developer - Resume
David Day
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
MaslowB
 
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012).NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
lancehilliard
 

La actualidad más candente (20)

Static Analysis Primer
Static Analysis PrimerStatic Analysis Primer
Static Analysis Primer
 
Approval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience ReportApproval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience Report
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
 
From Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with XtextFrom Stairway to Heaven onto the Highway to Hell with Xtext
From Stairway to Heaven onto the Highway to Hell with Xtext
 
Scala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and qualityScala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and quality
 
DevOpsDaysRiga 2017 ignite: Mikhail Iljin - DevOps meets Data Science - how t...
DevOpsDaysRiga 2017 ignite: Mikhail Iljin - DevOps meets Data Science - how t...DevOpsDaysRiga 2017 ignite: Mikhail Iljin - DevOps meets Data Science - how t...
DevOpsDaysRiga 2017 ignite: Mikhail Iljin - DevOps meets Data Science - how t...
 
Sql server infernals
Sql server infernalsSql server infernals
Sql server infernals
 
David Day - QA Developer - Resume
David Day - QA Developer - ResumeDavid Day - QA Developer - Resume
David Day - QA Developer - Resume
 
SQL Server Worst Practices - EN
SQL Server Worst Practices - ENSQL Server Worst Practices - EN
SQL Server Worst Practices - EN
 
Dave Haeffner's Proven Method to Grading the Quality of Selenium Tests
Dave Haeffner's Proven Method to Grading the Quality of Selenium TestsDave Haeffner's Proven Method to Grading the Quality of Selenium Tests
Dave Haeffner's Proven Method to Grading the Quality of Selenium Tests
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
Architecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsArchitecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applications
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012).NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
 
Azphp phpunit-jenkins
Azphp phpunit-jenkinsAzphp phpunit-jenkins
Azphp phpunit-jenkins
 
Property based testing - Less is more
Property based testing - Less is moreProperty based testing - Less is more
Property based testing - Less is more
 
Agile Testing Days
Agile Testing DaysAgile Testing Days
Agile Testing Days
 
Xtext Best Practices
Xtext Best PracticesXtext Best Practices
Xtext Best Practices
 
Carl shaulis agile_td2014
Carl shaulis agile_td2014Carl shaulis agile_td2014
Carl shaulis agile_td2014
 

Similar a Part of the DLM story: Get your Database under Source Control - SQL In The City

Discovery Life Project Portfolio
Discovery Life Project PortfolioDiscovery Life Project Portfolio
Discovery Life Project Portfolio
Jaco Koekemoer
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 

Similar a Part of the DLM story: Get your Database under Source Control - SQL In The City (20)

Team-based Development with Version Control
Team-based Development with Version ControlTeam-based Development with Version Control
Team-based Development with Version Control
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
 
Get Your Database Under Control
Get Your Database Under ControlGet Your Database Under Control
Get Your Database Under Control
 
Grant Fritchey Justin Caldicott - Best practices for database deployments
Grant Fritchey Justin Caldicott - Best practices for database deploymentsGrant Fritchey Justin Caldicott - Best practices for database deployments
Grant Fritchey Justin Caldicott - Best practices for database deployments
 
Making security-agile matt-tesauro
Making security-agile matt-tesauroMaking security-agile matt-tesauro
Making security-agile matt-tesauro
 
Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database Deployments
 
Discovery Life Project Portfolio
Discovery Life Project PortfolioDiscovery Life Project Portfolio
Discovery Life Project Portfolio
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 
Case study
Case studyCase study
Case study
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Software design with Domain-driven design
Software design with Domain-driven design Software design with Domain-driven design
Software design with Domain-driven design
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
 
Jose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release PipelineJose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release Pipeline
 
DNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror StoriesDNN-Connect 2019: DNN Horror Stories
DNN-Connect 2019: DNN Horror Stories
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
 

Más de Red Gate Software

Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops report
Red Gate Software
 

Más de Red Gate Software (20)

The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...
 
Embracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with Flyway
 
Database DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service Providers
 
Mizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journey
 
7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring
 
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
 
Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops report
 
Extend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesExtend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server Databases
 
2019 year in review slides
2019 year in review slides2019 year in review slides
2019 year in review slides
 
What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019
 
Quality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin University
 
How SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value faster
 
DevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve Jones
 
Successfully migrating existing databases to Azure
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to Azure
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
 
Using Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your database
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your Database
 
How to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture Change
 
Taming the Wild West
Taming the Wild West Taming the Wild West
Taming the Wild West
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Último (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
+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...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
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 🔝✔️✔️
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

Part of the DLM story: Get your Database under Source Control - SQL In The City

  • 1. Get Your Database Under Control Steve Jones Red Gate Software
  • 2. Goals • Understand the value of version/source control for databases • Learn the tools, standards, patterns and best practices needed to manage a database from source control • Identify the necessary flow within a team needed to develop a database with source control
  • 3. Get in touch Steve Jones www.voiceofthedba.com sjones@sqlservercentral.com @way0utwest
  • 4. How many of you use version control for your application code? C#, ASP.NET, Javascript, VB.NET, etc.
  • 5. How many of you use version control for your application code? database
  • 6. Developers who refuse to use source/version control should be fired, simple as that.
  • 7. Isn’t this too much trouble for my crappy experimental program?
  • 8. Use source control because neither you nor your developers are perfect.
  • 9. There are no excuses where you should not use it.
  • 10. If it’s not in source control, it doesn’t exist.
  • 11. “…your database should always be under source control right next to your application code.”
  • 12.
  • 17. Demo Getting started with databases in VCS
  • 18. Additional Reasons for Source Control • Backup & Restore • Undo • Audit changes • Sandbox • Branching/Merging
  • 19. Rules for Database Development Never use a shared database for development. Always Have a Single, Authoritative Source For Your Schema. Always Version Your Database.
  • 20. The Ideal • Each developer has a dedicated environment with a copy of the schema and minimal data. • A shared integration environment where all developers’ changes are merged, available for developer testing.
  • 21. Patterns and Practices • Get all your code – Object DDL – Assembly code – Security grants and revokes – Database configuration settings – Jobs for your application – Lookup data
  • 22. Patterns and Practices • Commit Early, Commit Often • Use meaningful comments. Why, not what. • Check for changes often • Use common names and code patterns • Use tools • Branch Rarely
  • 24. Teamwork • Communication o Team members need to be aware of (easily) what others are doing. • Coordination o Teams need to work in a way that complements each other.
  • 25. Teamwork • Communication o Review each other’s code as you refactor o Share knowledge o Coordination o Decide on common code styles and names o And …
  • 26. Teach
  • 27. Demo The flow within teams
  • 28. Reasons to Branch • Release • Hot Fixes • New Development • Integration • Feature set
  • 29. Reasons to Branch • Release • Hot Fixes • New Development • Integration • Feature set
  • 31. Best Practices • Use version control for all code (including tests) • Commit early, commit often • Use tools o If it’s hard, people don’t do it • Train people • Build often
  • 34. deployment package 1 2 3 FAI L Development
  • 35. Goals • Understand the value of version/source control for databases • Learn the tools, standards, patterns and best practices needed to manage a database from source control • Identify the necessary flow within a team needed to develop a database with source control
  • 36. Thanks for coming www.voiceofthedba.com sjones@sqlservercentral.com @way0utwest Want to try the tools you’ve just seen? Come to our Hands-on Labs
  • 37. References • http://stackoverflow.com/questions/115369/do-you-use-source-control-for-your- database-items • http://www.codinghorror.com/blog/archives/001050.html • http://www.codinghorror.com/blog/2008/02/get-your-database-under-version- control.html • http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLServerData bases.aspx • http://odetocode.com/blogs/scott/archive/2008/01/30/three-rules-for-database- work.aspx • Check in early, check in often - http://www.codinghorror.com/blog/2008/08/check-in-early-check-in-often. html • http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 38. Credits • https://www.flickr.com/photos/doug88888/8 349818088/in/photostream/ • https://www.flickr.com/photos/8525214@N 06/5132974421

Notas del editor

  1. How many people in the audience use version control for their application code? Any of your front end code. * Note number
  2. Let’s ask the same question. How many of you use version control for your database code? For your tables, views, procedures? What about schemas? What about permissions and roles? What about cryptographic keys? * Note number and difference.
  3. Developers who refuse to use source/version control should be fired, simple as that. – top stack exchange Isn’t this too much trouble for my crappy experimental program. - Drupal Use source control because neither you nor your developers are perfect. – bottom stack exchange There are no excuses where you should not use it. - makeuseof If it’s not in source control, it doesn’t exist. - TroyHunt http://programmers.stackexchange.com/questions/122150/how-can-i-convince-cowboy-programmers-to-use-source-control http://www.makeuseof.com/tag/git-version-control-youre-developer/ http://www.mactech.com/articles/mactech/Vol.14/14.06/VersionControlAndTheDeveloper/index.html http://drupal.org/node/299067
  4. Developers who refuse to use source/version control should be fired, simple as that. – top stack exchange Isn’t this too much trouble for my crappy experimental program. - Drupal Use source control because neither you nor your developers are perfect. – bottom stack exchange There are no excuses where you should not use it. - makeuseof If it’s not in source control, it doesn’t exist. - TroyHunt http://programmers.stackexchange.com/questions/122150/how-can-i-convince-cowboy-programmers-to-use-source-control http://www.makeuseof.com/tag/git-version-control-youre-developer/ http://www.mactech.com/articles/mactech/Vol.14/14.06/VersionControlAndTheDeveloper/index.html http://drupal.org/node/299067
  5. Developers who refuse to use source/version control should be fired, simple as that. – top stack exchange Isn’t this too much trouble for my crappy experimental program. - Drupal Use source control because neither you nor your developers are perfect. – bottom stack exchange There are no excuses where you should not use it. - makeuseof If it’s not in source control, it doesn’t exist. - TroyHunt http://programmers.stackexchange.com/questions/122150/how-can-i-convince-cowboy-programmers-to-use-source-control http://www.makeuseof.com/tag/git-version-control-youre-developer/ http://www.mactech.com/articles/mactech/Vol.14/14.06/VersionControlAndTheDeveloper/index.html http://drupal.org/node/299067
  6. Developers who refuse to use source/version control should be fired, simple as that. – top stack exchange Isn’t this too much trouble for my crappy experimental program. - Drupal Use source control because neither you nor your developers are perfect. – bottom stack exchange There are no excuses where you should not use it. - makeuseof If it’s not in source control, it doesn’t exist. - TroyHunt http://programmers.stackexchange.com/questions/122150/how-can-i-convince-cowboy-programmers-to-use-source-control http://www.makeuseof.com/tag/git-version-control-youre-developer/ http://www.mactech.com/articles/mactech/Vol.14/14.06/VersionControlAndTheDeveloper/index.html http://drupal.org/node/299067