Agile Database Techniques Using Visual Studio Team System Course

Course Code: IN 728
Course Abstract: This course provides participants with the knowledge and skills to properly manage the SQL Server database development lifecycle in an agile environment. The participant will learn how to manage changes to the database structure, ensuring quality through T-SQL unit testing, and how to automate the building and deploying of SQL Server databases. Intended for developers and administrators already comfortable with the concepts of designing, programming, testing, and deploying SQL Server databases, this course focuses on using Visual Studio Team System Edition for Database Professionals to maximize productivity while minimizing mistakes.
Audience: This course is intended for SQL Server database developers and administrators. Application developers who are involved with writing and testing T-SQL code and working with test data, will also gain value from this course.
Duration: 3 days
Learning Outcomes: Upon completion of this course, the participant will be able to:
> Identify the capabilities of the VSTS Database Professional edition
> Recognize the areas of integration with Team Foundation Server
> Identify VSTS' support for the Database Development Life Cycle
> Work offline so changes don’t impact actual servers
> Create and configure database projects
> Import existing schemas and scripts
> Place database projects under Team Foundation Version Control
> Compare schemas from two SQL Server instances for differences
> Compare data from two SQL Server instances for differences
> Generate scripts to reconcile differences in schemas and data
> Recognize and create effective T-SQL unit tests
> Identify and use database refactoring correctly
> Automatically generate test data in various scenarios
> Integrate test data generation with T-SQL unit testing
> Automate the building and deploying of database changes
> Use MSBuild and Team Build to manage build and deployment
> Extend VSTS by building your own test data generators
> Extend VSTS by building your own unit test assertions
Course Topics:

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)

Prerequisites: Before attending this course, the participant should have experience developing and administering SQL Server database projects. It would also be beneficial if the participant has worked on a team-based software development project and is familiar with the Software Development Life Cycle.
Note: All fields are required
At the present time we do not offer training for individuals or groups less then 6 individuals. We apologize for any inconvenience.


We Value Your Privacy!

Ready to get started or in need of more information? Contact us today.

Go To Blog Virtual Learning