Database Agility Pramod Sadalage ThoughtWorks. © 2002. ThoughtWorks, Inc.© Agile.Database:// Introduction The Traditional Database Continuous changes.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Configuration Management
Chapter 23 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Oracle Architecture. Instances and Databases (1/2)
Technical BI Project Lifecycle
Brian Alderman | MCT, CEO / Founder of MicroTechPoint Pete Harris | Microsoft Senior Content Publisher.
DataBase Administration Scheduling jobs Backing up and restoring Performing basic defragmentation and index rebuilding Using alerts Archiving.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Transaction Management and Concurrency Control
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Introduction to Databases Transparencies
Concepts of Database Management Sixth Edition
Chapter 12 File Management Systems
Week 2 Lecture 2 Structure of a database. External Schema Conceptual Schema Internal Schema Physical Schema.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Chapter 1 Introduction to Databases
Backup and Recovery Part 1.
Oracle9i Database Administrator: Implementation and Administration
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Database Management Systems (DBMS)
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 1) Academic Year 2014 Spring.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Introduction to Databases and Database Languages
Chapter 1 Database Systems. Good decisions require good information derived from raw facts Data is managed most efficiently when stored in a database.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Database refactoring. For the beginning… Avoid overspecialization Application developerDatabase developer Developer Communication Cooperation Exchange.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Databases and Statistical Databases Session 4 Mark Viney Australian Bureau of Statistics 5 June 2007.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Cross Language Clone Analysis Team 2 October 27, 2010.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Storing Organizational Information - Databases
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 12 Understanding database managers on z/OS.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
DB Zip Expert Portable database backup and export/import Copyright © SoftTree Technologies, Inc.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
Chapter 3 Databases and Data Warehouses: Building Business Intelligence Copyright © 2010 by the McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin.
ESRI User Conference 2004 ArcSDE. Some Nuggets Setup Performance Distribution Geodatabase History.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
1 On-Line Analytic Processing Warehousing Data Cubes.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
1 Chapter Overview Understanding Data Restoration Issues Understanding the Types of Database Backups Understanding the Restoration Process.
Isolated Database Environments Kevin Howell February 2014.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
KCIUG 30 January, 2004Raw Tables for Improved Load Performance1 Christopher Coleman Database Analyst Mediware Information Systems.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Continuous Deployments using SSDT
By Manish Shrotriya CSE MS 4 Point Agile Manifesto 1.Individuals and interactions over processes and tools 2.Working software over comprehensive.
( ) 1 Chapter # 8 How Data is stored DATABASE.
Table spaces.
EF Code First (Advanced)
LCGAA nightlies infrastructure
Purpose, Pitfalls and Performance Implications
Oracle9i Database Administrator: Implementation and Administration
Purpose, Pitfalls and Performance Implications
Chapter 11 Managing Databases with SQL Server 2000
Chapter 5 The Redo Log Files.
Presentation transcript:

Database Agility Pramod Sadalage ThoughtWorks

© ThoughtWorks, Inc.© Agile.Database:// Introduction The Traditional Database Continuous changes to the data model or the database are not allowed Production changes are rare or not allowed Migration is a project There is one Development / QA / UAT / Production database Change management is related to database code

© ThoughtWorks, Inc.© Agile.Database:// Introduction The Agile Database Slowly changing database. Functionality added in increments. Change management Facilitates automated testing Knowledge by developers of the functionality to be developed Acknowledged importance of team interaction

© ThoughtWorks, Inc.© Agile.Database:// Foundation Everyone Gets a Database A database instance is the same as an application instance Developers can work independent of other developers Everyone has the liberty of trying various changes with the database as if it were a scratch pad Scripts exist in order to provide a clean database for everyone

© ThoughtWorks, Inc.© Agile.Database:// Foundation Why Everyone Needs a Database

© ThoughtWorks, Inc.© Agile.Database:// Foundation The Database Instance The database analog to the application instance A data space containing, at the very least, the schema and setup data necessary to support an application instance A data space that is independent not affected by and not able to affect the space of another database instance

© ThoughtWorks, Inc.© Agile.Database:// The Database Instance Examples

© ThoughtWorks, Inc.© Agile.Database:// The Database Instance Why does the DBA need it? Easier to maintain specialized datasets for development, automated testing, demos, load testing, production copies, etc. Ability to migrate older datasets to newer versions of the application Allows us to think of the database as another component in the system, with a build number and a context

© ThoughtWorks, Inc.© Agile.Database:// The Database Instance Is State full and Locatable E.g. iteration 2, regression test database

© ThoughtWorks, Inc.© Agile.Database:// The Database Instance Why Would the Team Want It? To allow every developer the ability to code and test with his or her own, independent database Would you have an entire team develop all using the same single application instance? To make the database portable and restorable A developer can code and test against a specific set of data. If the developer breaks the dataset, no one else is affected and the developer simply loads up a fresh copy. Promotes better team velocity

© ThoughtWorks, Inc.© Agile.Database://The Database Instance The Database as File System Think of the database instance as if it were a file. Commands such as create, copy, move and delete can be made applicable to the database instance

© ThoughtWorks, Inc.© Agile.Database:// Lineage Schema and Setup Data Setup data; is non transactional, allows testing to occur. Every alteration to the schema and setup data must be chronologically logged and source- controlled with the application code A fully-functional database instance can be built at any time to any point in the development timeline Old database instances can be rolled forward by applying the logged changes made to schema and setup data

© ThoughtWorks, Inc.© Agile.Database:// Lineage Master and Child Instances

© ThoughtWorks, Inc.© Agile.Database:// Lineage New Lineages Should be created when A portion of the team (QA, reporting, etc) requires a unique and maintainable dataset The application is branched Should not be created for non-essential reasons example: to maintain a unit-test suite that fails to work on the latest load of converted data

© ThoughtWorks, Inc.© Agile.Database:// Lineage Every Lineage Has... A master instance A change log An update list A collection of child instances

© ThoughtWorks, Inc.© Agile.Database:// Lineage The Master Instance Every lineage has a master upon which it is based The master instance: Is the gold standard for that lineage Is updated every time an update is made to the lineage Is the mold from which all new copies of that instance are made Should be updated only by designated members of the team

© ThoughtWorks, Inc.© Agile.Database:// Lineage The Change Log A stored collection of all changes(Schema and Data) made to the lineage master and its child instances. The change log: Will likely be written in SQL Should be source controlled Is the tool by which instances will be rolled forward (backward if needed) Should be named by Build/Release/Day/Week/ etc

© ThoughtWorks, Inc.© Agile.Database:// Lineage/ Change Log Destructive Actions Whenever possible, use a clean up log Destructive actions are entered into the clean-up log with a run date that is several days in the future. Actions such as Drop table, Drop column, Make Column Not Null are considered destructive. Destructive changes are propagated only after all team members have been given a chance to move to the latest code. Assumes, code is being integrated more than once a day.

© ThoughtWorks, Inc.© Agile.Database:// Lineage The Update List The means by which database instances are kept up to date... While the data model evolves As developers and other team members actively code and test against their individual database instances Communicates changes to the lineage’s master and all its child instances, automatically. Each master instance should have an update list Database instances can subscribe to the update lists that belongs to their lineage

© ThoughtWorks, Inc.© Agile.Database:// Lineage The Update List [an example] connect run c:\dbscripts\changes.sql connect run c:\dbscripts\changes.sql connect run c:\dbscripts\changes.sql connect run c:\dbscripts\changes.sql connect run c:\dbscripts\changes.sql run c:\dba\lists\QA_Update_list.sql

© ThoughtWorks, Inc.© Agile.Database.Framework:// The Fundamentals Allow Developers to Experiment Function-Driven Database Design Clean Tests People Infrastructure Complexity

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals Allow Developers To Experiment Developers can change the model in their local schema so that they can rollback if the change they made does not work efficiently. The DBA should get involved in the design sessions for the functionality being developed. The DBA should help the developers to design the tables, Indexes, tune queries for performance.

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals Function-Driven Database Design Use functionality or change requests or story cards to grow the database A typical change should contain: The schema alterations to be done Comments for all new database objects being added (two years down the line, someone will need to know; why a given attribute was added) Default values and data migration details Define proper constraints on columns and tables.

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals Function-Driven Database Design 1. Developers design changes along with the DBA When starting work on a new piece of functionality or when refactoring. 2. DBA reviews all change requests Speaks for other parties (e.g. conversion and reporting) Delays destructive actions Keep a log of all change requests Writes data migration code.

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals People Team collaboration is essential Developers, QA, Analysts and DBAs need to be on board Project management must understand and think Agile Encourage experimentation and tolerate failures Push for automated testing and demand clean tests. Encourage team to use production data.

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals Infrastructure Hardware to support one or more databases per person is necessary It should not take more than 30 minutes to copy a database instance If necessary, work with slices of production data Start converting data; day 1 of the project. If feasible use light weight DBMS, while in development e.g. Hypersonic, MySQL etc.

© ThoughtWorks, Inc.© Agile.Database:// Fundamentals Complexity One system, many data sources One data source, many systems Many systems, many data sources

© ThoughtWorks, Inc.© Agile.Database:// Production Handling the application in production is surprisingly simple. Because: The database is being developed, tracked and sourced with the same rigor as code The Change Logs are your migration scripts

© ThoughtWorks, Inc.© Agile.Database:// Production First Time Deployment Should be handled almost exactly the same as deploying code Archive a copy of the production instance Branch if necessary The production instance will be either A clean copy of the application database Full of converted data

© ThoughtWorks, Inc.© Agile.Database:// Production Additional Releases All of the change logs should be applied following the last production migration. In chronological order. (Change Logs are stored by Build/Release/Day/Week) Since data migration scripts are part of change logs, data is also migrated It is wise to test the migration on a test database

© ThoughtWorks, Inc.© Agile.Database:// Production Additional Releases

© ThoughtWorks, Inc.© Agile.Database:// Production Thinking Forward Production database instances can be migrated to a future state of development. New releases can be acceptance tested against the most recent data currently in production. Migration is a snap, so why not deploy weekly or frequently.

© ThoughtWorks, Inc.© Database Agility Tools and Automation

© ThoughtWorks, Inc.© Tools.and.Automation:// Process Automation The DBA should attempt to automate any process he finds himself doing repeatedly Whenever possible these tools should be pushed out to team members It is better to give too much access than not enough Process automation is absolutely, utterly essential if the DBA is to respond to a myriad of requests in a timely manner

© ThoughtWorks, Inc.© Tools.and.Automation:// Tools DB Manager A ThoughtWorks Tool

© ThoughtWorks, Inc.© Tools.and.Automation:// Other Tools On-Line Data Dictionary (Java) Data loading utilities (Visual Basic in Excel) Reporting replication process (UNIX shell scripts) DB backup and schema file transfer (Perl)

© ThoughtWorks, Inc.© More Resources..   