Basel · Baden · Bern · Lausanne · Zürich · Düsseldorf · Frankfurt/M. · Freiburg i. Br. · Hamburg · München · Stuttgart Visual Studio for Database Professionals.

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

Development Life Cycle using Visual Studio Team Edition for DB Professionals Richard Fennell Engineering Director SQLBits II Birmingham 1 st March 2008.
2012 © Trivadis BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN Welcome November 2012 Highlights BI.
2012 © Trivadis BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN Welcome November 2012 Effiziente Data.
Programming Paradigms and languages
Basel · Baden Bern · Brugg · Lausanne Zurich Düsseldorf · Frankfurt/M. · Freiburg i. Br. Hamburg · Munich · Stuttgart · Vienna Entwicklung von SharePoint.
Day 3 - Basics of MySQL What is MySQL What is MySQL How to make basic tables How to make basic tables Simple MySQL commands. Simple MySQL commands.
Project Management Database and SQL Server Katmai New Features Qingsong Yao
Module 4: Creating Data Types and Tables. Overview Creating Data Types Creating Tables Generating Column Values Generating Scripts.
Creating Tables, Defining Constraints Rose-Hulman Institute of Technology Curt Clifton.
2 DAT320 Testing and Refactoring Your Database with Visual Studio Team Edition for Database Professionals.
(code name: Data Dude) Josh Robinson Aculix.
Creating a SharePoint App with Microsoft Access Services
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Copyright ©2014 Pearson Education, Inc. Chapter 6 Physical Design Chapter6.1.
Brian Keller Technical Evangelist
Copyright © Curt Hill SQL The Data Definition Language.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
Database Unit Testing Team Edition for Database Professionals Sachin Rekhi Program Manager Microsoft Corporation
Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Chapter 7 SQL HUANG XUEHUA. SQL SQL server2005 introduction Install components  management studio.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
Managing the Database Lifecycle using Team Edition for Database Professionals Randy Pagels Developer Technology Specialist Microsoft Corporation.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems
Jean-Claude Trachsel Senior Consultant Trivadis AG Building a Website with ASP.NET MVC.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Module 3: Creating Data Types and Tables. Overview Working with Data Types Working with Tables Generating Column Values Generating Scripts.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
Data Types Lesson 4. Skills Matrix Table A table stores your data. Tables are relational in that they are organized as rows and columns (a matrix). Each.
SQL Server 2005 Implementation and Maintenance Chapter 3: Tables and Views.
Database projects in visual studio 2010 Anthony Brown
IMS 4212: Data Modeling—Attributes and Domains 1 Dr. Lawrence West, Management Dept., University of Central Florida Attributes and Domains.
Creating and Populating a MS SQLServer Database Presented By: Dr. Adam P. Anthony.
A Guide to SQL, Eighth Edition Chapter Eight SQL Functions and Procedures.
Data Modeling Creating E/R Diagrams SoftUni Team Technical Trainers Software University
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
2012 © Trivadis BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN Welcome November 2012 Columnstore Indexes.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Basel · Baden · Bern · Lausanne · Zürich · Düsseldorf · Frankfurt/M. · Freiburg i. Br. · Hamburg · München · Stuttgart · Wien Microsoft MSDN TechTalk Reusable.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Basel · Baden · Bern · Lausanne · Zürich · Düsseldorf · Frankfurt/M. · Freiburg i. Br. · Hamburg · München · Stuttgart · Wien Trivadis Integration Architecture.
Creating E/R Diagrams with SQL Server Management Studio, Writing SQL Queries D0ncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Web Database Programming Using PHP
Creating Database Objects
Visual Studio Database Tools (aka SQL Server Data Tools)
Visual Studio 2010 Database Projects
Managing Tables, Data Integrity, Constraints by Adrienne Watt
Module 2: Creating Data Types and Tables
Lecture 6 Data Model Design (continued)
Web Database Programming Using PHP
Attributes and Domains
Database systems Lecture 2 – Data Types
Visual Studio Database Tools (aka SQL Server Data Tools)
A JSON’s Journey through SQL Server
CIS16 Application Programming with Visual Basic
PT2520 Unit 5: Physical Design
DAT381 Team Development with SQL Server 2005
Attributes and Domains
Introduction to VSTS Database Professional
Creating Database Objects
JDBC II IS
CS4540 Special Topics in Web Development SQL and MS SQL
Presentation transcript:

Basel · Baden · Bern · Lausanne · Zürich · Düsseldorf · Frankfurt/M. · Freiburg i. Br. · Hamburg · München · Stuttgart Visual Studio for Database Professionals MSDN TechTalk M. Lattmann, Consultant Wallisellen,

© 2006 Kurs- bzw. TC-Namen eingeben2 Agenda  Data Generation  Generating Test Data  Database Unit Testing  Creating Unit Tests  Extending Unit Tests  Extensibility  Generator Extensibility  Distributor Extensibility  Conditions Extensibility  Core messages Knowledge transfer is only the beginning. Knowledge application is what counts.

© 2006 Kurs- bzw. TC-Namen eingeben3 Demo Generating Test Data

© 2006 Kurs- bzw. TC-Namen eingeben4  Value generators  Simple generators for each data type  Strings: ASCII and Unicode ((var)char, n(var)char, (n)text)  Numbers: tinyint, smallint, int, bigint, real, float, decimal, numeric, money  Binary ((var)binary, image)  Date and Time  UniqueIdentifier (GUID)  Bit  Complex generators  Foreign Key, Regular Expression, Data Bound Generator  Distributions  Uniform, Normal, NormalInverse, Exponential, ExponentialInverse  Can import column distributions from production database (*) (*) Not implemented in CTP7 Generating Test Data

© 2006 Kurs- bzw. TC-Namen eingeben5 Agenda  Data Generation  Generating Test Data  Database Unit Testing  Creating Unit Tests  Extending Unit Tests  Extensibility  Generator Extensibility  Distributor Extensibility  Conditions Extensibility  Core messages Knowledge transfer is only the beginning. Knowledge application is what counts.

© 2006 Kurs- bzw. TC-Namen eingeben6 Unit Testing  Do changes break your existing code?  Tests for  Stored Procedures, Functions  Triggers  Any SQL  Unit test designer is SQL focused  Work in the language of your choice: T-SQL, C#, VB.NET  Builds on existing Unit Test functionality in Team System  Works together with your application tier unit tests  Well established in.NET development

© 2006 Kurs- bzw. TC-Namen eingeben7  Automatically generate unit tests stubs for:  Stored Procedures, Functions, Triggers  Test Validation (assertions)  T-SQL (server based) Assertions  RAISERROR command  Client Side Assertions  None Empty ResultSet  Row Count  Execution Time, … Database Unit Testing

© 2006 Kurs- bzw. TC-Namen eingeben8 Demo Unit Testing

© 2006 Kurs- bzw. TC-Namen eingeben9  Automatic Deployment Integration  Automatically deploy database project prior to running tests  Data Generation Integration  Automatically generate data based on generation plan prior to running tests  Test Scripts use standard Team System Unit Tests  Pre- und Post Test Scripts are specific for a single unit Test. TestInitialize() and TestCleanup() are common within a test class.  Generated Code can be extended using C# or VB.NET Pre & Post Test Scripts

© 2006 Kurs- bzw. TC-Namen eingeben10 Pre & Post Test Scripts [AssemblyInitialize]... DeployDatabaseProject(); GenerateData(); [TestInitialize] Common Script [Test] Pre-Test 1 Test 1 Post-Test 1 [TestCleanup()] Common Script [TestInitialize()] Common Script [Test] Pre-Test 2 Test 2 Post-Test 2 [TestCleanup()] Common Script [AssemblyCleanup]... <DatabaseDeployment... App.config (DatabaseSetup.cs) Per test project per Test Per Test Per test class

© 2006 Kurs- bzw. TC-Namen eingeben11 Managing Transactions in Unit Tests BEGIN TRANSACTION TestTransaction UPDATE "Order Details" set Quantity = Quantity + 10 IF RAISERROR('Row count does not equal 50',16,1) ROLLBACK TRANSACTION TestTransaction  Capability of putting tests in automatic rollback mode to always maintain original state of database  Implementation in T-SQL

© 2006 Kurs- bzw. TC-Namen eingeben12 Managing Transactions in Unit Tests  C#, per Test [TestMethod()] public void dbo_InsertTable1Test() { CommittableTransaction tx = new CommittableTransaction(); ExecutionContext.Connection.EnlistTransaction(tx); PrivilegedContext.Connection.EnlistTransaction(tx); // run tests tx.Rollback(); }

© 2006 Kurs- bzw. TC-Namen eingeben13 Managing Transactions in Unit Tests  C#, for all Tests TransactionScope _trans; [TestInitialize()] public void Init() { _trans = new TransactionScope(); base.InitializeTest(); } [TestCleanup()] public void Cleanup() { base.CleanupTest(); _trans.Dispose(); }

© 2006 Kurs- bzw. TC-Namen eingeben14 Demo Extending Unit Tests

© 2006 Kurs- bzw. TC-Namen eingeben15 Agenda  Data Generation  Generating Test Data  Database Unit Testing  Creating Unit Tests  Extending Unit Tests  Extensibility  Generator Extensibility  Distributor Extensibility  Conditions Extensibility  Core messages Knowledge transfer is only the beginning. Knowledge application is what counts.

© 2006 Kurs- bzw. TC-Namen eingeben16 Generator Extensibility  Team System has many Extension Points  Generator Extensibility is just an Example  Implemented by.NET Developer  Used by DB Professional

© 2006 Kurs- bzw. TC-Namen eingeben17 Data Generator Extensibility  Generators  Implement:  IDesigner  IGenerator  Base class  Generator  Attributes  GeneratorAttribute  GeneratorNameAttribute  Distributions  Implement:  IDistribution  Conditions  Implement:  ICondition

© 2006 Kurs- bzw. TC-Namen eingeben18  Generators and Distributions have to:  Live in or under the: %ProgramFiles%\Microsoft Visual Studio 8\DBPro\Extensions directory  Get registered in the %ProgramFiles%\Microsoft Visual Studio 8\DBPro\Microsoft.VisualStudio.TeamSystem.Data.Extensions.xml file  Be strong key signed Microsoft.VisualStudio.TeamSystem.Data.Generators.RegexString, Microsoft.VisualStudio.TeamSystem.Data.Generators, Version= , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Microsoft.VisualStudio.TeamSystem.Data.Generators.RegexString, Microsoft.VisualStudio.TeamSystem.Data.Generators, Version= , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Microsoft.VisualStudio.TeamSystem.Data.Generators.Exponential, Microsoft.VisualStudio.TeamSystem.Data.Generators, Version= , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Microsoft.VisualStudio.TeamSystem.Data.Generators.Exponential, Microsoft.VisualStudio.TeamSystem.Data.Generators, Version= , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a </types> Registration

© 2006 Kurs- bzw. TC-Namen eingeben19 Demo Generator Extensibility

© 2006 Kurs- bzw. TC-Namen eingeben20 Core messages  All Tasks of DB Developers integrated in the Team System Lifecycle  Less support for DBAs and DB Architects  Strong Support of Database Changes  Automatically generate Change Scripts  Repository, Versioning  Strong Testing Features  Unit Tests, Data Generation  Integrated in MSBuild  Automated Regression Tests  Extensible Data are always part of the game.

© 2006 Kurs- bzw. TC-Namen eingeben21 Pricing, Licensing and Availability  CTP 7 Available Today  Availability for MSDN Universal Subscribers  Around 8. Dec 2006  General availability in January 2007:  Included in Team Suite at No Extra Cost  Purchase as an individual Edition  Same pricing as other Team System Editions

© 2006 Kurs- bzw. TC-Namen eingeben22 Literature  Ambler, Sadalage: Refactoring Databases: Evolutionary Database Design