Top Banner
What’s New for Developers in SQL Server 2008 Mike Taulty, Mike Ormond Developer & Platform Group Microsoft Ltd [email protected] (http://www.mtaulty.com ) [email protected] (http://www.mikeo.co.uk )
51

What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Mar 17, 2018

Download

Documents

dinhnhi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

What’s New for Developers in SQL Server 2008

Mike Taulty, Mike Ormond

Developer & Platform Group

Microsoft [email protected] (http://www.mtaulty.com)

[email protected] (http://www.mikeo.co.uk )

Page 2: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Agenda

Relational++

New data types beyond the traditional RDBMS

Data In, Data Out

Information from Data

Database Applications

Core Capabilities & Tooling

Page 3: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Relational++

Page 4: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

New Data Types

FILESTREAMExtension to varbinary(max)Data is stored in the file systemAccess with file system API’s or relational API’s

HIERARCHY IDModel the traditional employee/manager relationship

New Date & Time data typesDATE, TIME, DATETIMEOFFSET, DATETIME2 & functions to deal with them

Page 5: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

XML Data Type Enhancements

Improved schema validation supportSupports validation of Office 12 documents

Allows for lax content

Unions of lists

Lists of unions

XQuery supportFWOR finally becomes FLWOR (the let clause)

Use of variables in .modify() operations

Page 6: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

CLR Data Type Enhancements

UDTs > 8K possible for CLR implementations

AggregatesMulti-input aggregates now possible in CLR implementations

Aggregates > 8K now possible in CLR implementations

Sort order on CLR Table Valued FunctionsToday, SQL spools output from CLR TVF’s and thensorts them – often this is redundant

Page 7: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Data Types, XML, CLR

Page 8: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Spatial Data

Proliferation of geographical dataGPS SystemsVirtual Earth, Live Search Maps etc

New opportunities for spatially aware appsRoute planningLand assessmentTerritory analysis

SQL Server 2008Storage and retrieval of spatial data using standard SQL syntax

Page 9: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Spatial Data Types

Comprehensive SupportFlat Earth (Planar) - geometryRound Earth (Geodetic) – geography

CLR System TypesMicrosoft.SqlServer.Types.Geo[metry | graphy]

Host of useful spatial methods / properties (OGC)Importing of WKT / WKB (OGC) and GML data

High PerformanceIntegrated into SQL 2008Spatial Index support

Page 10: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Spatial Data in SQL 2008

Page 11: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Semi-Structured Additions

Sparse columns

Optimised storage for sparsely populated columns

Wide Tables

Support for hundreds of thousands of sparse columns

Filtered Indexes

Define indices over subsets of data in tables

Page 12: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ProducID Description Category Price Current Colour Size Volume Fabric Fitment COSHH

1 DuluxEmulsion

Paint 22.95 False Blue - 1.5 - - 8729

2 Roller Tools 3.95 False - L - - - -

3 Rug Home 79.50 False Brown - - Wool - -

4 Bulb Electrical 1.25 True Pearl - - - Screw -

5 Weedkiller Garden 7.99 True - - 1.0 - - 2776

6 Bamboo Garden 35.00 True Yellow - - - - -

7 2x4 Wood 2.95 True - - - - - -

8 ... ... ... ... ... ... ... ... ... ...

ProducID Description Category Price Current Colour Size Volume Fabric Fitment COSHH

1 DuluxEmulsion

Paint 22.95 False Blue - 1.5 - - 8729

2 Roller Tools 3.95 False - L - - - -

3 Rug Home 79.50 False Brown - - Wool - -

4 Bulb Electrical 1.25 True Pearl - - - Screw -

5 Weedkiller Garden 7.99 True - - 1.0 - - 2776

6 Bamboo Garden 35.00 True Yellow - - - - -

7 2x4 Wood 2.95 True - - - - - -

8 ... ... ... ... ... ... ... ... ... ...

ProducID Description Category Price Current Colour Size Volume Fabric Fitment COSHH

1 DuluxEmulsion

Paint 22.95 False Blue - 1.5 - - 8729

2 Roller Tools 3.95 False - L - - - -

3 Rug Home 79.50 False Brown - - Wool - -

4 Bulb Electrical 1.25 True Pearl - - - Screw -

5 Weedkiller Garden 7.99 True - - 1.0 - - 2776

6 Bamboo Garden 35.00 True Yellow - - - - -

7 2x4 Wood 2.95 True - - - - - -

8 ... ... ... ... ... ... ... ... ... ...

Filt

ered

Ind

ex

Semi-Structured Additions

‘Fixed’ Columns Sparse Columns

Page 13: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Data In, Data Out

Page 14: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

SQL Server Integration Services

New Script Environment for Script Tasks & Components

VSTA replaces VSA (deprecated)

– C# language programmability

– More of the familiar VS environment

ADO.NET Source and Destination

OLEDB source/destinations still there

Data Profiling Task & Viewer

Page 15: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

SQL Server Integration Services

Data Flow performanceIn 2005, an execution tree (even with branches) is executed on a single threadIn 2008, this is handled differently (i.e. better)

Lookup TransformationShare cached lookup across packagesMore granular control over cache use for matched/non-matched data

Additional changes elsewhereMERGE, Change Data Capture, Data Types, etc.

Page 16: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Integration Services

Page 17: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Tracking Changes

Change TrackingSynchronous - when the DML is committed

Detect net changes to data

Tables/Rows effectively have a version #

Good for building one- and two- way sync solutions

Change Data CaptureAsynchronous - reads transaction log

Detect net and incremental changes to data

Good for building one- way sync solutions

Page 18: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Change Tracking & Data Capture

Page 19: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

MERGE

DML statement combining multiple operations into one

source targetMerge

match so UPDATE

no match so INSERT

no source match so DELETE

Page 20: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

MERGE statement

Page 21: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Synchronisation Services

Synchronisation FrameworkOnline/Offline Applications2-tier, N-tier architectures

Set of componentsSync ClassesClient Database

– SQL Server Compact Edition

Server Database– Any ADO.NET store

“Service” Based Approach

Client DB

Server DB

Page 22: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Synchronisation Services

Server SyncProvider

SyncAgent

SyncAdapters

Client SyncProvider

Sync TableSync Group

Client DB

Server DB

Transport

Proxy Service

Page 23: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Microsoft Synchronisation Services

Page 24: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Information from Data

Page 25: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Reporting Services

Dependency on IIS has gone

New Design Surface

New Visualisations

Table + Matrix = Tablix

Delivery via Microsoft Office

Page 26: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Reporting Services

Page 27: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Reach All your Users withScalable BI platform

Deliver insights throughout your organization

Deliver reports of any size at enterprise scaleScale out through read-only Analysis Services storageEnhance analytical capabilities with more complex computations and aggregations

Deploy and manage your BI infrastructure

Streamline development of the analysis infrastructure with new cube design toolsOptimize cube design with real time best practice alerts Backup cubes with enhanced scalability

Scalable Report Engine

Scale out Analysis

Subspace Computations

New Cube Design Tools

Best Practice Design Alerts

Scalable Backup Tools

Pervasive

Insight

Page 28: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Database Applications

Page 29: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Client Library Support for Features

Visual Studio 2008 ships with;.NET Framework V3.5

– Support for most new SQL 2008 data types– Support for table valued parameters

Microsoft Synchronization Services

SQL Server 2008 ships with;Client library support for some new data types;

– Microsoft.SqlServer.Types.dll (SqlGeometry, SqlHierarchyId)

ADO.NET V3.0 Entity Framework, Data Services ship separately

Page 30: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Table Valued Parameters

Stored procedures and functions can now take a table as a parameter

Passing “arrays” of data to the server in one goOften done in the past with XML, strings

MechanismDeclare table type server sideDefine parameter to be of table typeNew ADO.NET parameter type SqlDbType.Structured

– Pass DataTable, IEnumerable<SqlDataRecord>, DbDataReader into ADO.NET client side

Page 31: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Table Valued Parameters

Page 32: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

.NET Entity Provider (Entity SQL)

Command

ConnectionReader

Adapter

V3.0

ADO.NET Entity Framework

Store

.NET Data Provider

V2.0

Command

ConnectionReader

Adapter

V3.0

Conceptual Model

Entity Entityrelationship

Mapping (MSL)

V3.0Programming Model

Object Relational Mapping

LINQ

Page 33: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Entity Framework

Schema independence

Store independence

Higher level constructsRelationships

Inheritance

StatusAt Beta 2 Today

Tooling at CTP 1

Store

.NET Provider

V2.0

Conceptual Model

.NET Provider(EntitySQL)

ORM & LINQ

V3.0

Map

pin

g

Page 34: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Entity Framework

Page 35: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Data Services (“Astoria”)

Flexible data services for the webHTML + Javascript

Data (XML, JSON)

DLL + XAML

Data (XML, JSON) Data (XML, JSON)

Mashup UI

Data Feeds

URI addressable resources (RESTful)

Simple data formats (XML / JSON)

Modelling of data with EDM

CRUD operations support

Page 36: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Astoria URI Format

Data Service URL (special WCF service)

Entity Set Name (eg Customers)Optional Predicate

Navigation Property (eg Orders)Optional Predicate

Querystring Options (eg orderby)

http://localhost/service.svc/Customers[ALFKI]/Orders?$orderby=City

Page 37: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

ADO.NET Data Services

Page 38: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Core Capabilities

Page 39: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Resource Governor

Dynamically monitors & controls access to server resources

request

Resource Pool 1 Resource Pool 2

Workload Group 1

Workload Group 2

MIN, MAX CPUMIN, MAX RAM

MIN, MAX CPUMIN, MAX RAM

Workload Group 3

Workload Group 1

PriorityMax Request MemoryMax Request CPU TimeMax DOPMax Requestsclassify()

Page 40: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Resource Governor

Page 41: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Guiding Procedure Execution

More control & visibility of stored procedure execution to aid predictable execution

sp_create_plan_guide accepts XML Showplan outputsp_create_plan_guide_from_cachesys.fn_validate_plan_guidePlan guides visibile in Management Studio

MonitoringEvents – Plan Guide (Un)SuccessfulCounters – (Mis)Guided Plan Executions/Sec

– on SQL Statistics object

Page 42: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Guiding Procedure Execution

Page 43: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Data Collector

Collection SetCollection Set

Collection Set

Performance Studio

Unified framework for capturing “metrics” from SQL Server

Collection ItemCollection Item

Collection Item

Counter, SQL trace or SQL query

schedule

Interfaces

Mgmt Studio

S’procs

API

Dashboard UI post SQL 2008

Page 44: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Data Collector

Page 45: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Extended Events (XEvent)

High performance eventing system for SQL

Integrates with Event Tracing for Windows (ETW)

Possibility of end-to-end tracing

DDL for managing event sessions on a server

“When” to log

Where to send it Data to

logFilters

Page 46: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Extended Events

Page 47: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Auditing (not in current CTP)

Written to files or event logs

Server level auditing

– Login, Logoff, Create DB, etc. (many)

Database level auditing

– Changes to Users, Roles, Schema, etc. (many)

Granular level auditing

– CRUD + EXECUTE on tables, views, procedures, etc.

AUDIT UPDATE ON Employee [BY User1]

Page 48: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Platform Enhancements

Transparent Data Encryption (TDE)

Encrypt my data on disk transparent to applications

Database Compression (not in CTP5)

ROW / PAGE Compression

Integrated Full Text Search (not in CTP5)

Easier to deploy / manage and better performance

Declarative Management Framework

Establish policies for monitoring or compliance

Page 49: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

Platform Enhancements

Page 50: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

MSDN in the UK

Visit http://msdn.co.ukNewsletter

Events

Screencasts

Blogs

Page 51: What’s New for Developers in SQL Server 2008download.microsoft.com/.../msdn/events/NewForDevelopersInSQLServ… · LINQ. ADO.NET Entity Framework ... HTML + Javascript Data (XML,

© 2007 Microsoft Ltd. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.