MSF for Agile Software Development Visual Studio 2005 Team System logo

Activity:

Refactor Database Code

Participating Roles

Responsible:

Database Developer

Overview

Entry Criteria

  • Database unit tests are complete and the code is debugged.

Sub-Activities

1

Identify Complexity

  • When functionality is added, look for areas of code that increase architectural complexity.
  • Identify the appropriate refactoring to reduce the complexity while keeping the semantics of the code the same.
  • Identify and run the database unit tests for the area to be refactored.

2

Apply Refactoring

  • Apply the refactoring, one at a time. Change the code and all the references to the changed area as necessary.
  • If methods (stored procedures, functions, triggers) are too complex, it may be necessary to break up a method into a set of new methods.

3

Build Database Project

  • Build the database project.
  • Review and fix any build errors identified.

4

Deploy Database Project to Sandbox Server

  • Deploy database project to sandbox server.
  • Ensure deployment is successful by browsing deployed database.

5

Perform Database Unit Tests

  • Perform unit tests so the area remains semantically equivalent after the refactoring.
  • Fix any nonworking unit tests that have not been correctly updated or refactored.

Exit Criteria

The database code is refactored and unit tested.

© 2006 Microsoft Corporation. All rights reserved.

Version 4.1.0