DATABASE DEVELOPMENT WITH VISUAL STUDIO 2010 Chris Dahlberg 1.

Slides:



Advertisements
Similar presentations
Roger Boesch Developer Technical Specialist Developer and Platform Group.
Advertisements

Ibiza, June 6 th 2011 Advanced Database Install Scripts.
NGT Information Technology Technical Discussion Bob DeHoff Info Tech, Inc.
Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide Standardizing Application.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Copyright 2002 Prentice-Hall, Inc. Chapter 4 Automated Tools for Systems Development 4.1 Modern Systems Analysis and Design Third Edition.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
(code name: Data Dude) Josh Robinson Aculix.
Deploying Visual Studio Team System 2008 Team Foundation Server at Microsoft Published: June 2008 Using Visual Studio 2008 to Improve Software Development.
René Balzano Technology Solution Professional Data Platform Microsoft Switzerland Database Development with SQL Server Data Tools (SSDT)
SQL Server Management Studio Introduction
© 2006, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Automation – How to.
Simple Web SQLite Manager/Form/Report
 Gert E.R. Drapers Group Engineering Manager Microsoft Corporation TL45.
User Group 2015 Version 5 Features & Infrastructure Enhancements.
Data-tier Application, Import, Refactoring, Publish, Schema Comparison, Database Unit Testing Borislav Statev Telerik Software Academy academy.telerik.com.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Slides adapted from those used by Jeffrey Ullman, via Jennifer Welch Via Yoonsuck Choe.
PHP1-1 PHP & SQL Xingquan (Hill) Zhu
Selected Topics in Software Computing Distributed Software Development CVSQL Final Project Presentation.
Copyright © 2006, SAS Institute Inc. All rights reserved. What Is New in SAS Profitability Management (PrM) 2.1? Authors: Jack Zhang Solution & Version:
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Office 365 Platform Flexible Tools Understand different provisioning options and their advantages and disadvantages…
DBA’s, Oracle Designer and the Development Life Cycle By Peter Wilkinson, Mercury International Ltd. Leslie Tierstein, SCI Consulting, Inc.
Back Office Solution For C.T Smith Stock Brokers WEG-34.
Company LOGO 1 Database Creation and Maintenance Jorge G. Martinez.
Chris Wright Senior Systems Engineer, Lucity MOVING TO ONE DATABASE FOR SQL SERVER.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Kako razvijate PL/SQL pakete? File based PL/SQL development Mitja Golouh SIOUG 2006,
Name Microsoft Student Partner Overview of the Visual Studio 2005 Express Products.
ALM and practical guidance for VSTS Database Projects Jens K. Suessmeyer Developer hearted, relational minded Visual Studio ALM Core Ranger
Database projects in visual studio 2010 Anthony Brown
DATABASE DEVELOPMENT WITH VSTS DATABASE EDITION By Chris Dahlberg ©2009 Aspect Software, Inc. All rights reserved. 1.
Database Projects in Visual Studio Improving Reliability & Productivity.
Chapter 4 Automated Tools for Systems Development Modern Systems Analysis and Design Third Edition 4.1.
Module 1 Introduction to SQL Server® 2008 R2 and its Toolset.
Automated tests CustomWare.Net. Goals Quality Finding problems before delivering Stability Upgrade projects Downgrade Refactoring Deacreasing of manual.
CIS 375—Web App Dev II ASP.NET 1 Getting Started.
Azure databases 1. Azure storage possibilities Azure offers several storage possibilities Microsoft SQL Server database MySQL database Azure Document.
Virtual techdays INDIA │ august 2010 Data-tier Applications in Visual Studio 2010 Abhishek Kala │ Partner Technical Consultant, Microsoft Global.
Introducing Application and Multi-Server Management.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
 What is DB Testing ?  Testing at the Data Access Layer  Need for Testing DB Objects  Common Problems that affect the Application  Should Testers.
SharePoint Fest 2013 Chicago What’s New and Exciting (and not so great) in SharePoint Designer 2013 Workflows Ira Fuchs – SharePoint Technical Specialist,
Sql Server 2012 Data Tools & Development Enhancements Emrah USLU Teknoloji Danışmanı TCM | Teknoloji Çözümleri Merkezi.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Others Talk, We Listen. Managing Database Projects in Visual Studio 2013.
Introduction to SSDT Daniel Maxic Important note: in order to make this presentation I have used some of the content.
Introduction ITEC 420.
Building Enterprise Applications Using Visual Studio®
Modern Systems Analysis and Design Third Edition
Modern Systems Analysis and Design Third Edition
SQL Server 2016 Security Features
Azure Automation and Logic Apps:
SQL Server Data Tools Gert Drapers
SQL OVERVIEW DEFINING A SCHEMA
Modern Systems Analysis and Design Third Edition
Rick Negrin, Program Manager Adrian Bethune, Program Manager Microsoft
Modern Systems Analysis and Design Third Edition
What about the Data Dude?
Data Definition Language
4/20/ :00 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Microsoft SQL Server 2014 for Oracle DBAs Module 10
Structured Query Language Path from Unorganized to Organized….
Modern Systems Analysis and Design Third Edition
PNW SQL Users Group August 10th, 2011
Presentation transcript:

DATABASE DEVELOPMENT WITH VISUAL STUDIO 2010 Chris Dahlberg 1

“Legacy” Database Development Change management can be difficult ◦ Full database backups ◦ Numerous CREATE/ALTER scripts Difficult for offline development Difficult to integrate into ALM ◦ Lack of proper versioning tools ◦ Lack of formal testing tools 2

CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) class Auction { Int32 Id { get; set; } String Name { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } } Version Control Challenge DatabaseDatabase Revision History AppApp V 1 V 2 V 3 class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } Int32 Duration { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } Int32 Duration { get; set; } } ALTER TABLE Auctions ADD startTime DATETIME NULL ALTER TABLE Auctions ADD startTime DATETIME NULL ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL

-- Version 1: Add table dbo.Auction IF OBJECT_ID (N'dbo.Auction', N'U') IS NULL BEGIN CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) END -- Version 2 Add startTime column IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = ‘startTime') BEGIN ALTER TABLE Auctions ADD startTime DATETIME NULL END -- Version 3: Add duration column IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = ‘duration’) BEGIN ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL END -- Version 1: Add table dbo.Auction IF OBJECT_ID (N'dbo.Auction', N'U') IS NULL BEGIN CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) END -- Version 2 Add startTime column IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = ‘startTime') BEGIN ALTER TABLE Auctions ADD startTime DATETIME NULL END -- Version 3: Add duration column IF NOT EXISTS (SELECT * FROM sys.columns WHERE name = ‘duration’) BEGIN ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL END Manual Versioning

The Solution Database development in Visual Studio Source Code Control Simplified Deployment Refactoring Code Analysis Unit Testing Build automation

class Auction { Int32 Id { get; set; } String Name { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } } CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) Logical Database Version Control The “Visual Studio” Approach Revision History AppApp V 1 V 2 V 3 CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } Int32 Duration { get; set; } } class Auction { Int32 Id { get; set; } String Name { get; set; } DateTime StartTime { get; set; } Int32 Duration { get; set; } }

CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NULL ) Incremental Deployment Logical Database Deployment The “Visual Studio” Approach Revision History CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) New Deployment CREATE TABLE dbo.Auction ( id INT NOT NULL PRIMARY KEY, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) CREATE TABLE dbo.Auction ( id INT NOT NULL PRIMARY KEY, name VARCHAR(25) NOT NULL, startTime DATETIME NOT NULL, duration INT NOT NULL ) ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL ALTER TABLE Auctions ALTER COLUMN startTime DATETIME NOT NULL ALTER TABLE Auctions ADD duration int NOT NULL V 1 V 2 V 3

Database project types Database Project Available for SQL Server 2005 and SQL Server 2008 Defines a user database Supports all objects implemented by the respective SQL Server version Server Project Available for SQL Server 2005 and SQL Server 2008 Defines server-level objects and modifications to the SQL master database Examples of server-level objects are logins and custom error messages Data-tier Application Component Defines databases that will be deployed to SQL Server Utilities A self-contained unit of management that defines and bundles database objects and SQL Server instance objects that are associated with the database and deployment requirements

Database Tools Roadmap ©2009 Aspect Software, Inc. All rights reserved.9 Offline Change management SQL 2000/2005 ALM support for databases SQL 2008 support Separated Build and Deploy No “DesignDB” required SQL 2008 R2 support SQL IntelliSense Support for 3 rd party database platforms Data-tier Application Component Projects introduced Data-tier Application Component projects and Database projects operate SxS SQL Azure support Visual Designers Single deployment engine Mission critical app support Full support for SQL objects Project system enhancements ALM feature enhancements vNext Vision Combine the best of Data-tier Application Component and Database Projects