DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals .


69 views
Uploaded on:
Category: News / Events
Description
2. DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals . 3. 4. DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals (Part 2) . Sachin RekhiProgram ManagerMicrosoft Corporation. Gert E.R. DrapersArchitect/Development ManagerMicrosoft Corporation.
Transcripts
Slide 1



Slide 2

DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals

Slide 4

DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals (Part 2) Sachin Rekhi Program Manager Microsoft Corporation Gert E.R. Drapers Architect/Development Manager Microsoft Corporation

Slide 5

Agenda The Database Development Life Cycle The Database Developer Story Data Generation Database Unit Testing Schema Refactoring The Power of Integration Summary

Slide 6

Other Sessions Introducing Visual Studio Team Edition for Database Professionals DEV217 - 6/13/2006 10:15AM - 11:30AM, room: 104 ABC Managing and Deploying your SQL Server Schemas with Visual Studio Team Edition for Database Professionals DAT312 - 6/13/2006 1:00PM - 2:15PM, room: 156 ABC Testing & Refactoring your Database with Visual Studio Team Edition for Database Professionals DAT320 - 6/14/2006 8:30AM - 9:45AM, room: 160 ABC Under the Hood of Visual Studio Team Edition for Database Professionals DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC

Slide 7

Product Overview Database Project System Schema and Script Versioning (SCC Integration) Schema Build & Deploy Schema Compare Data Compare Database Unit Testing (Test) Data Generator Schema Refactoring T-SQL Editor with Query Execution Work Item and Process Integration with TFS

Slide 8

Project Model The focal point of gravity The database extend speaks to "reality" as to blueprint forming Optionally database venture can be set under source control .SQL script records is the accepted configuration utilized Changes are followed at the "protest level" For instance lists, limitations, triggers are followed free of the base table definition, all together have the most noteworthy granularity of progress following

Slide 9

Database Development Life Cycle The cycle of life for database designers Import database pattern SQL Server Database Project Template Database Project Create New Project SQL Script Reverse specialist existing .SQL script documents (*) (*) Not actualized in the current CTP

Slide 10

Database Development Life Cycle The cycle of life for database engineers Edit Refactor Compare Database Project Deploy Build Data Generation Test Compare

Slide 11

Deploy SQL Script SQL Server Database Development Life Cycle The cycle of life for database engineers Import database composition SQL Server Database Build extend Database Project Template Database Project Create New Project Deploy extend SQL Script Reverse specialist existing .SQL script records (*) (*) Not executed in the current CTP

Slide 12

Continuing the Journey… to some extent 1 we built up: A Database Project speaking to our diagram Placed it under variant control Create a sandbox situation utilizing Build & Deploy Verified if the sandbox coordinates the venture and the first database, utilizing Schema Compare Now we are prepared to begin rolling out improvements! To begin with we will make test information Which will be utilized by the proving ground we are making So we can approve our progressions made utilizing Schema Refactoring

Slide 13

Data Generation Design Time Setting up Data Generation infers characterizing: Which generator to utilize Which circulation to append to the generator Changing setting on the generator & dispersion The quantities of lines to create Optionally characterizing the rowcount proportions between tables By default: Each segment is bound to the generator coordinating the section information sort FK segments are mapped to the Foreign Key generator Uniqueness is gathered from PK, UC limitations and records Using the Uniform dissemination when not one of a kind

Slide 14

Data Generation Design Time Value generators Simple generators for every information sort Strings: ASCII and Unicode ((var)char, n(var)char, (n)text) Numbers: tinyint, smallint, int, bigint, genuine, coast, decimal, numeric, cash Binary ((var)binary, picture) Date and Time UniqueIdentifier (GUID) Bit Complex generators Foreign Key, Regular Expression, Data Bound Distributions Uniform, Normal, Inverse Normal, Exponential, Inverse Exponential Can import segment appropriations from generation database (*) (*) Not actualized in the current CTP

Slide 15

Data Generation Distributions @ Work

Slide 16

Data Generation Design Time Understand area imperatives Check limitations (min/max) Table cardinality Enforce table proportions Column esteem conveyance

Slide 17

Data Generation Executing a Data Generation Definition Validation of Security necessities Fails when security prerequisites are not met! Target composition against DGEN definitions Fails the era when ties don\'t coordinate! Alternatively cleanse tables Required to ensure repeatable information era Spin up parallel floods of INSERT proclamations Based on connection sends between tables Number of associations utilized is as of now gated by the pattern connections. Configurable Error Thresholds

Slide 18

Data Generation Customization & Extensibility Customization of significant worth era RegEx Generator Data Bound Generator Extensibility Custom Generator Custom Distribution Discussed in detail in: Under the Hood of Visual Studio Team Edition for Database Professionals DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC

Slide 19

Data Generation Sachin Rekhi Program Manager Visual Studio Team System

Slide 20

Database Unit Testing Design Time Automatically produce unit tests stubs for: Stored Procedures, Functions (*), Triggers (*) Test Validation (declarations) T-SQL (server based) Assertions RAISERROR order Client Side Assertions None Empty ResultSet Row Count Execution Time, … Pre & Post Test Scripts (*) Not actualized in the current CTP

Slide 21

Database Unit Testing Test Execution Automatic Deployment Integration Automatically convey database extend before running tests (*) Data Generation Integration Automatically create information in view of era plan preceding running tests Execution & Validation associations Validation association can be higher special record (*) Not actualized in the current CTP

Slide 22

Database Unit Testing Customization & Extensibility Database Unit Test originator produces C# or VB.NET code Can alter produced code for: Custom test approval rationale Parameterized test bolster Managing exchanges Additional test setup and teardown of tests Discussed in detail in: Under the Hood of Visual Studio Team Edition for Database Professionals DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC

Slide 23

Database Unit Testing Sachin Rekhi Program Manager Visual Studio Team System

Slide 24

Database Schema Refactoring What is refactoring? "A database refactoring is a little change to your database composition which enhances its outline without changing its semantics." Agile Database Development, Scott Ambler For instance: Rename a Schema Object Name for consistency, understandability, practicality… Objective: Rename ALL diagram protest references; immediate and backhanded inside all: Tables, sees, put away methodology, client characterized capacities, …

Slide 25

Database Schema Refactoring Rename Refactoring… Rename any SQL 2000 & SQL 2005 construction question Updates all references in… Schema Objects Data Generation Plans Scripts Database Unit Tests Preview changes preceding submit Global fix to turn around all progressions

Slide 26

Database Schema Refactoring Safety Net Unit Testing Develop a battery of tests to pursue a refactoring to guarantee database still capacities of course Version Control Store every single past variant so you can simply backpedal to an earlier pattern in source control Schema Compare Analyze the correct contrasts between the venture and live database to comprehend the effect of the refresh

Slide 27

Schema Refactoring Sachin Rekhi Program Manager Visual Studio Team System

Slide 28

Integrating In To The Cycle of Life Edit Refactor Compare Database Project Deploy Build Data Generation Test Compare

Slide 29

End-to-End Database Development Sachin Rekhi Program Manager Visual Studio Team System

Slide 30

Summary Handle Schema Change Management and Deployment Mitigate the Risks Involved with rolling out and conveying improvements Integrate the Database Professional into the Development Life Cycle

Slide 31

Resources Break-out Sessions Under the Hood of Visual Studio Team Edition for Database Professionals DAT433 - 6/15/2006 1:00PM - 2:15PM, room: 160 ABC Hands on Labs DEV008 Take a Tour of Visual Studio 2005 Team System for Database Professionals Chalk Talks Visual Studio Team Edition for Database Professionals: Overview DEV TLC Theater 6/15/2006 9:45AM-11:00AM

Slide 32

Resources… CTP 3 Download Site http://download.microsoft.com/download/1/a/3/1a32ea84-11a3-4adf-953e-7a65b9831f5a/VSDATAD1.img Team Website http://msdn.microsoft.com/vstudio/teamsystem/items/dbpro/default.aspx Product Forum http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=725&SiteID=1 PowerToys and Samples http://gotdotnet.com/Workspaces/Workspace.aspx?id=378460fd-1254-427b-aa7d-e777a826a564 Blogs http://blogs.msdn.com/gertd

Slide 33

Fill out a session assessment on CommNet for an opportunity to Win a XBOX 360!

Slide 34

© 2006 Microsoft Corporation. All rights saved. Microsoft, Windows, Windows Vista and other item names are or might be enlisted trademarks as well as trademarks in the U.S. and additionally different nations. The data thus is for educational purposes just and speaks to the present perspective of Microsoft Corporation as of the date of this introduction. Since Microsoft must react to changing economic situations, it ought not be deciphered to be a pledge with respect to Microsoft, and Microsoft can\'t ensure the precision of any data gave after the date of this introduction. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN T

Recommended
View more...