Module 1: Agile Database Development
This module reminds us of the reality of developing and maintaining SQL Server databases in an agile environment. Topics include listing the related support from the Visual Studio Team System Edition for Database Professionals and some common scenarios.
Lessons
• Agile database development
• Agile database techniques
• Visual Studio Team System Edition for Database Professionals
• Scenarios
• Resources
Lab Exercises
• Review the team, project, and scenario for all the labs
Module 2: Database Projects
This module introduces database projects and how they support an offline, disconnected mode of development and testing, which is important in an agile environment. Topics include a discussion of the integration with Visual Studio 2005/2008 and support for importing schema and scripts into these database projects.
Lessons
• Database projects
• Creating a database project
• Visual Studio integration
• Importing schemas
• Importing scripts
Lab Exercises
• Explorer Visual Studio integration
• Create and configure a database project
• Import schema from an existing database
• Import script from a file
• Review the design-time validation database (optional)
Module 3: Change Management
This module discusses how database projects integrate with Team Foundation Server’s change management features. Topics include an introduction to Team Foundation Server, working with Team Projects, version control, work item integration, as well as the intrinsic schema and data change management tools in the Database Professionals edition.
Lessons
• Team Foundation Server
• Working with team projects
• Methodologies and work items
• Team Foundation Version Control
• Using Team Foundation Version Control
• Placing database projects under version control
• Comparing two database schemas for differences
• Comparing data from two databases for differences
• Generating change scripts to merge differences
Lab Exercises
• Create a team project and work items
• Configure version control
• Place a database project under version control
• Explore Visual Studio 2005/2008 version control integration
• Compare schemas from two SQL Server instances for differences
• Compare data from two SQL Server tables for differences
• Generate scripts to reconcile differences in schemas and data
• Explore the MSSCCI provider from SQL Server Management Studio (optional)
• Explore the updated MSF guidance for database professionals (optional)
Module 4: Unit Testing
This module introduces the need for unit testing and related support within the Team Edition for Database Professionals. Topics include test projects, writing good unit tests, and the integration of T-SQL unit tests with your existing .NET unit tests.
Lessons
• Unit testing
• Test Driven Development (TDD)
• Creating database unit tests
• SQL assertions and test conditions
• Executing unit tests and evaluating the results
Lab Exercises
• Create and execute database unit tests
• Use pre-test and post-test actions
• Use an ordered list
• Export and import test results
• Create unit tests automatically from Schema View
Module 5: Refactoring
This module introduces the concept of refactoring and its support in the Team Edition for Database Professionals.
Lessons
• Refactoring
• Refactoring support in Visual Studio 2005/2008
• Code refactoring
• Database refactoring
• Rename refactoring
• Regression testing
Lab Exercises
• Rename schema objects
• Preview changes
• Undo refactoring using Global Undo
• Review the refactoring log
Module 6: Data Generation
This module discusses the problems surrounding test data, from security risks to the loss of functionality when working with meaningless data. Topics include the data generation architecture and how data generation plans can be used to generate meaningful, deterministic data for any number of reasons.
Lessons
• The problem with data
• Data generation plans
• Data generators
• Regular expression generator
• Data bound generator
• Integration with unit testing
Lab Exercises
• Review the existing schema and database unit tests
• Create a data generation plan
• Use a regular express generator
• Use a data bound generator
• Use related tabled and ratios
• Generate data automatically prior to running unit tests
Module 7: Build and Deploy
This module wraps up the life cycle with the discussion of building and deploying any schema changes to a target SQL Server instance. Topics include the build and deployment architecture, Team Build and MSBuild integration, deployment options and scripts, and how to automate the entire process.
Lessons
• The need for automated build and deployment
• Building
• Deploying
• Integration with MSBuild
• Integration with Team Build
Lab Exercises
• Build the database project
• Deploy the database schema changes
• Use custom deployment scripts
• Use MSBuild directly
• Automate using Team Build
Module 8: Extensibility
This module describes the various extensibility points found within the Team Edition for Database Professionals, including data generators and distributors, unit test assertions and conditions, and custom MSBuild tasks.
Lessons
• Customization vs. extensibility
• Areas of extensibility
• Visual Studio templates
• Custom test conditions
• Custom data generators
• Custom check-in policies
Lab Exercises
• Edit database object templates
• Create a custom data generator
• Create a custom unit test assertion
• Create a custom check-in policy (optional)