What's New for Data?

30
Eric Nelson Developer & Platform Group Microsoft Ltd [email protected] http://blogs.msdn.com/ericnel http://twitter.com/ericnel

description

 

Transcript of What's New for Data?

Page 1: What's New for Data?

Eric NelsonDeveloper & Platform GroupMicrosoft [email protected] http://blogs.msdn.com/ericnel http://twitter.com/ericnel

Page 2: What's New for Data?

RelationalImproved

XMLUDTs

NewFilestreamHierarchy IDDate & TimeSpatial dataSparse columns and wide tablesFiltered indexesChange trackingTable parameters to SP callsResource governorSP control and monitoringDatabase compressionDeclarative management...

SQL Server Integration Services

VSTA replaces VSAADO.NETPerformanceMerge...

Reporting Services“IIS free”TablixNew designer...

BICube designDeisgn alertsPerformance...

Page 3: What's New for Data?
Page 4: What's New for Data?
Page 5: What's New for Data?

What is it?Technique for working with relational tables as if they were objects in memoryIntention is to hide away the complexity of the underlying tables and give a uniform way of working with data

Why use it?ProductivityRetain database independence

NotesThere are many ORMs for .NET developers already in existence. E.g.

LLBLGen Pro http://www.llblgen.com/Nhibernate http://www.hibernate.org/343.htmlEntitySpaces http://www.entityspaces.net/Portal/Default.aspx

Objects vs Classes vs Entities

Page 6: What's New for Data?
Page 7: What's New for Data?

What is it?Tools and services to create an Entity Data Model

EDM gives ORM to SQL Server, Oracle, DB2 etc

Tools and services for consuming an Entity Data Model

Why use it?ProductivityComplex mapping between entities and database tablesWorks great with ADO.NET Data Services

NotesStrategic but just released...

Page 8: What's New for Data?

Application modelMapped to a persistence store

Comprised of three layers:

Conceptual (CSDL)Mapping (MSL)Storage (SSDL)

Database agnosticComprised of:

EntitiesAssociationsFunctions

ConceptualConceptual

MappingMapping

StorageStorage

Entity Data ModelEntity Data Model

Page 9: What's New for Data?
Page 10: What's New for Data?

Entity ClientEntity SQL

Object ServicesEntity SQLLINQ To Entities

Page 11: What's New for Data?

Familiar ADO.NET object model:EntityCommandEntityConnectionEntityDataReaderEntityParameterEntityTransaction

Text-based resultsRead-onlyUses Entity SQL

Page 12: What's New for Data?

Queries materialized as ObjectsObjectContextObjectQuery<T>

Built on top of Entity ClientTwo query options:

Entity SQLLINQ

Runtime services:Unit of workIdentity trackingEager/explicit loading

Page 13: What's New for Data?

LINQ To EntitiesLINQ To Entities

Object ServicesObject Services

Entity SQLEntity SQL

Entity ClientEntity Client

ADO.NET ProviderADO.NET Provider

Page 14: What's New for Data?
Page 15: What's New for Data?

Vendor DB Support

Microsoft SQL ServerOracle Sample, Generic Sample

Devart Oracle, MySQL, Postgress

Phoenix SQLite

IBM DB2, Informix Dynamic Server

MySQL AB MySQL

Npgsql PostgreSQL

OpenLink Many via OpenLink ODBC or JDBC

DataDirect Oracle, Sybase, SQL Server, DB2

Firebird Firebird

Page 16: What's New for Data?

LINQ to SQL LINQ to Entities

Database Support

SQL Server Many

Object Relational Mapping Capabilities

Simple Complex

Requires Attributed .NET Code

No Yes

Status Released Just Released

Page 17: What's New for Data?

LINQ to SQLvar products = from prod in db.Product where prod.Color == "Blue" select prod;

LINQ to Entitiesvar products = from prod in db.Product where prod.Color == "Blue" select prod;

In general – LINQ to Entities does more – but not always!Only migration that will ever happen is LINQ to SQL migration to LINQ to Entities

Page 18: What's New for Data?
Page 19: What's New for Data?

What is it?HTTP access to an object model exposed as RESTful Web ServicesData and/or methodsData returned using ATOM or JSONRead/Write

Why use it?Easy to expose data over the internet accessible by any client

Page 20: What's New for Data?

Data Access LayerData Access LayerData Access LayerData Access Layer

Entity Entity FrameworkFramework

Entity Entity FrameworkFramework

Relational

database

Relational

database Other sourcesOther

sources

Data Services RuntimeData Services RuntimeData Services RuntimeData Services Runtime

Hosting/HTTP ListenerHosting/HTTP ListenerHosting/HTTP ListenerHosting/HTTP Listener

CustomCustomCustomCustom

Iqueryable/IenumerableIqueryable/Ienumerable [+ IUpdatable][+ IUpdatable]

HTTPHTTPHTTPHTTP

Page 21: What's New for Data?

Resources

Res 1

Res 2

Res 3

Res 4

HTTP RequestURL

VERB

Payload

HTTP Response

Status

GETPOSTPUT

DELETEXML JSON

Payload

XML JSON

Page 22: What's New for Data?

Provide a type with public properties which are;

IQueryable<T>, IEnumerable<T>

Also get write access if your type implements;

IUpdatable

Works well with generated code from;ADO.NET Entity Framework (ObjectContext)LINQ to SQL (DataContext*)

Page 23: What's New for Data?
Page 24: What's New for Data?
Page 25: What's New for Data?

http://blogs.msdn.com/ericnel - all the linksGeneral

ADO.NET Team Blog http://blogs.msdn.com/adonetMike in our team http://www.miketaulty.com ( search Entity or LINQ )Data Platform Developer Centre http://msdn.microsoft.com/en-gb/data/default.aspx

ADO.NET Entity FrameworkEF DM http://blogs.msdn.com/dsimmons FAQ http://blogs.msdn.com/dsimmons/pages/entity-framework-faq.aspx Entity Framework Design http://blogs.msdn.com/efdesign/default.aspx

ADO.NET Data ServicesTeam blog http://blogs.msdn.com/astoriateam

Page 26: What's New for Data?

© 2008 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.

Page 27: What's New for Data?
Page 28: What's New for Data?
Page 29: What's New for Data?

Entity Entity ClientClient

Entity Entity Data Data ModelModel

Entity Entity Data Data ModelModel

SSDLSSDLSSDLSSDL

SQLSQLSQLSQL

OraclOraclee

OraclOraclee

OtherOtherOtherOther

CSDLCSDL MSLMSL

Object Object ServiceService

ss

ESQLESQL““select o from select o from

orders”orders”

LINQ to LINQ to EntitiesEntities

““from o in from o in orders...”orders...”

ADO.NET Data ADO.NET Data servicesservices

Pro

vid

er

Pro

vid

er

Pro

vid

er

Pro

vid

er

Pro

vid

er

Pro

vid

er

SSDLSSDLSSDLSSDL

SSDLSSDL

HTTPHTTPHTTPHTTP CustomCustom

InterceptorInterceptorss

(Query, (Query, Update)Update)

Service Service Operations Operations (Methods)(Methods)

Entity Entity Data Data ModelModel

Page 30: What's New for Data?

REpresentational State TransferServer-side resources identified by a URIAccess is over HTTP, verb tied to action

GET to read the value of a resourcePOST to create a new resourcePUT to update an existing resourceDELETE to delete a resource

Returned data is “plain” – XML or JSON

Is this “the death of SOAP”?