SQL Server 2008 for Developers

1,565 views

Published on


SQL Server 2008

In this event we'll take a look at what's coming down the line for database developers with SQL Server 2008. We'll look at changes to the core engine and the T-SQL language, any changes in the toolset and we'll also take a good look at what's coming with ADO.NET V3.0 in terms of the new Entity Framework and the new Microsoft Synchronisation Framework. If you're a SQL Server developer come along and see what's in store for 2008.

For more details and the original slidedeck visit http://www.microsoft.com/uk/msdn/events/new/Detail.aspx?id=322

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,565
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
60
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SQL Server 2008 for Developers

  1. 1. What’s New for Developers in SQL Server 2008 Mike Taulty, Mike Ormond Developer & Platform Group Microsoft Ltd [email_address] ( http://www.mtaulty.com ) [email_address] ( http://www.mikeo.co.uk )
  2. 2. Agenda <ul><li>Relational++ </li></ul><ul><ul><li>New data types beyond the traditional RDBMS </li></ul></ul><ul><li>Data In, Data Out </li></ul><ul><li>Information from Data </li></ul><ul><li>Database Applications </li></ul><ul><li>Core Capabilities & Tooling </li></ul>
  3. 3. Relational++
  4. 4. New Data Types <ul><li>FILESTREAM </li></ul><ul><ul><li>Extension to varbinary(max) </li></ul></ul><ul><ul><li>Data is stored in the file system </li></ul></ul><ul><ul><li>Access with file system API’s or relational API’s </li></ul></ul><ul><li>HIERARCHY ID </li></ul><ul><ul><li>Model the traditional employee/manager relationship </li></ul></ul><ul><li>New Date & Time data types </li></ul><ul><ul><li>DATE, TIME, DATETIMEOFFSET, DATETIME2 & functions to deal with them </li></ul></ul>
  5. 5. XML Data Type Enhancements <ul><li>Improved schema validation support </li></ul><ul><ul><li>Supports validation of Office 12 documents </li></ul></ul><ul><ul><li>Allows for lax content </li></ul></ul><ul><ul><li>Unions of lists </li></ul></ul><ul><ul><li>Lists of unions </li></ul></ul><ul><li>XQuery support </li></ul><ul><ul><li>FWOR finally becomes FLWOR (the let clause) </li></ul></ul><ul><li>Use of variables in .modify() operations </li></ul>
  6. 6. CLR Data Type Enhancements <ul><li>UDTs > 8K possible for CLR implementations </li></ul><ul><li>Aggregates </li></ul><ul><ul><li>Multi-input aggregates now possible in CLR implementations </li></ul></ul><ul><ul><li>Aggregates > 8K now possible in CLR implementations </li></ul></ul><ul><li>Sort order on CLR Table Valued Functions </li></ul><ul><ul><li>Today, SQL spools output from CLR TVF’s and then sorts them – often this is redundant </li></ul></ul>
  7. 7. Data Types, XML, CLR
  8. 8. Spatial Data <ul><li>Proliferation of geographical data </li></ul><ul><ul><li>GPS Systems </li></ul></ul><ul><ul><li>Virtual Earth, Live Search Maps etc </li></ul></ul><ul><li>New opportunities for spatially aware apps </li></ul><ul><ul><li>Route planning </li></ul></ul><ul><ul><li>Land assessment </li></ul></ul><ul><ul><li>Territory analysis </li></ul></ul><ul><li>SQL Server 2008 </li></ul><ul><ul><li>Storage and retrieval of spatial data using standard SQL syntax </li></ul></ul>
  9. 9. Spatial Data Types <ul><li>Comprehensive Support </li></ul><ul><ul><li>Flat Earth (Planar) - geometry </li></ul></ul><ul><ul><li>Round Earth (Geodetic) – geography </li></ul></ul><ul><li>CLR System Types </li></ul><ul><ul><li>Microsoft.SqlServer.Types .Geo[metry | graphy] </li></ul></ul><ul><ul><li>Host of useful spatial methods / properties (OGC) </li></ul></ul><ul><ul><li>Importing of WKT / WKB (OGC) and GML data </li></ul></ul><ul><li>High Performance </li></ul><ul><ul><li>Integrated into SQL 2008 </li></ul></ul><ul><ul><li>Spatial Index support </li></ul></ul>
  10. 10. Spatial Data in SQL 2008
  11. 11. Semi-Structured Additions <ul><li>Sparse columns </li></ul><ul><ul><li>Optimised storage for sparsely populated columns </li></ul></ul><ul><li>Wide Tables </li></ul><ul><ul><li>Support for hundreds of thousands of sparse columns </li></ul></ul><ul><li>Filtered Indexes </li></ul><ul><ul><li>Define indices over subsets of data in tables </li></ul></ul>
  12. 12. Semi-Structured Additions ProducID Description Category Price Current Colour Size Volume Fabric Fitment COSHH 1 Dulux Emulsion 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 Dulux Emulsion 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 ... ... ... ... ... ... ... ... ... ... ‘ Fixed’ Columns Sparse Columns
  13. 13. Data In, Data Out
  14. 14. SQL Server Integration Services <ul><li>New Script Environment for Script Tasks & Components </li></ul><ul><ul><li>VSTA replaces VSA (deprecated) </li></ul></ul><ul><ul><ul><li>C# language programmability </li></ul></ul></ul><ul><ul><ul><li>More of the familiar VS environment </li></ul></ul></ul><ul><li>ADO.NET Source and Destination </li></ul><ul><ul><li>OLEDB source/destinations still there  </li></ul></ul><ul><li>Data Profiling Task & Viewer </li></ul>
  15. 15. SQL Server Integration Services <ul><li>Data Flow performance </li></ul><ul><ul><li>In 2005, an execution tree (even with branches) is executed on a single thread </li></ul></ul><ul><ul><li>In 2008, this is handled differently (i.e. better ) </li></ul></ul><ul><li>Lookup Transformation </li></ul><ul><ul><li>Share cached lookup across packages </li></ul></ul><ul><ul><li>More granular control over cache use for matched/non-matched data </li></ul></ul><ul><li>Additional changes elsewhere </li></ul><ul><ul><li>MERGE, Change Data Capture, Data Types, etc. </li></ul></ul>
  16. 16. Integration Services
  17. 17. Tracking Changes <ul><li>Change Tracking </li></ul><ul><ul><li>Synchronous - when the DML is committed </li></ul></ul><ul><ul><li>Detect net changes to data </li></ul></ul><ul><ul><li>Tables/Rows effectively have a version # </li></ul></ul><ul><ul><li>Good for building one- and two- way sync solutions </li></ul></ul><ul><li>Change Data Capture </li></ul><ul><ul><li>Asynchronous - reads transaction log </li></ul></ul><ul><ul><li>Detect net and incremental changes to data </li></ul></ul><ul><ul><li>Good for building one- way sync solutions </li></ul></ul>
  18. 18. Change Tracking & Data Capture
  19. 19. MERGE <ul><li>DML statement combining multiple operations into one </li></ul>Merge source target match so UPDATE no match so INSERT no source match so DELETE
  20. 20. MERGE statement
  21. 21. ADO.NET Synchronisation Services <ul><li>Synchronisation Framework </li></ul><ul><ul><li>Online/Offline Applications </li></ul></ul><ul><ul><li>2-tier, N-tier architectures </li></ul></ul><ul><li>Set of components </li></ul><ul><ul><li>Sync Classes </li></ul></ul><ul><ul><li>Client Database </li></ul></ul><ul><ul><ul><li>SQL Server Compact Edition </li></ul></ul></ul><ul><ul><li>Server Database </li></ul></ul><ul><ul><ul><li>Any ADO.NET store </li></ul></ul></ul><ul><li>“ Service” Based Approach </li></ul>
  22. 22. ADO.NET Synchronisation Services Server Sync Provider Sync Agent Sync Adapters Client Sync Provider Sync Table Sync Group Client DB Server DB Transport Proxy Service
  23. 23. Microsoft Synchronisation Services
  24. 24. Information from Data
  25. 25. Reporting Services
  26. 26. Reporting Services
  27. 27. Reach All your Users with Scalable BI platform <ul><li>Deliver insights throughout your organization </li></ul><ul><ul><li>Deliver reports of any size at enterprise scale </li></ul></ul><ul><ul><li>Scale out through read-only Analysis Services storage </li></ul></ul><ul><ul><li>Enhance analytical capabilities with more complex computations and aggregations </li></ul></ul><ul><li>Deploy and manage your BI infrastructure </li></ul><ul><ul><li>Streamline development of the analysis infrastructure with new cube design tools </li></ul></ul><ul><ul><li>Optimize cube design with real time best practice alerts </li></ul></ul><ul><ul><li>Backup cubes with enhanced scalability </li></ul></ul>Pervasive Insight
  28. 28. Database Applications
  29. 29. Client Library Support for Features <ul><li>Visual Studio 2008 ships with; </li></ul><ul><ul><li>.NET Framework V3.5 </li></ul></ul><ul><ul><ul><li>Support for most new SQL 2008 data types </li></ul></ul></ul><ul><ul><ul><li>Support for table valued parameters </li></ul></ul></ul><ul><ul><li>Microsoft Synchronization Services </li></ul></ul><ul><li>SQL Server 2008 ships with; </li></ul><ul><ul><li>Client library support for some new data types; </li></ul></ul><ul><ul><ul><li>Microsoft.SqlServer.Types.dll (SqlGeometry, SqlHierarchyId) </li></ul></ul></ul><ul><li>ADO.NET V3.0 Entity Framework, Data Services ship separately </li></ul>
  30. 30. Table Valued Parameters <ul><li>Stored procedures and functions can now take a table as a parameter </li></ul><ul><ul><li>Passing “arrays” of data to the server in one go </li></ul></ul><ul><ul><li>Often done in the past with XML, strings </li></ul></ul><ul><li>Mechanism </li></ul><ul><ul><li>Declare table type server side </li></ul></ul><ul><ul><li>Define parameter to be of table type </li></ul></ul><ul><ul><li>New ADO.NET parameter type SqlDbType.Structured </li></ul></ul><ul><ul><ul><li>Pass DataTable, IEnumerable<SqlDataRecord>, DbDataReader into ADO.NET client side </li></ul></ul></ul>
  31. 31. Table Valued Parameters
  32. 32. ADO.NET Entity Framework .NET Entity Provider (Entity SQL) Command Connection Reader Adapter V3.0 Store .NET Data Provider V2.0 Command Connection Reader Adapter V3.0 Conceptual Model Entity Entity relationship Store Model (SSDL) ER Model (CSDL) Mapping (MSL) V3.0 Programming Model Object Relational Mapping LINQ
  33. 33. ADO.NET Entity Framework <ul><li>Schema independence </li></ul><ul><li>Store independence </li></ul><ul><li>Higher level constructs </li></ul><ul><ul><li>Relationships </li></ul></ul><ul><ul><li>Inheritance </li></ul></ul><ul><li>Status </li></ul><ul><ul><li>At Beta 2 Today </li></ul></ul><ul><ul><li>Tooling at CTP 1 </li></ul></ul>Store .NET Provider V2.0 Conceptual Model .NET Provider (EntitySQL) ORM & LINQ V3.0 Mapping
  34. 34. ADO.NET Entity Framework
  35. 35. ADO.NET Data Services (“Astoria”) <ul><li>Flexible data services for the web </li></ul><ul><li>URI addressable resources (RESTful) </li></ul><ul><li>Simple data formats (XML / JSON) </li></ul><ul><li>Modelling of data with EDM </li></ul><ul><li>CRUD operations support </li></ul>HTML + Javascript Data (XML, JSON) DLL + XAML Data (XML, JSON) Data (XML, JSON) Mashup UI Data Feeds
  36. 36. Astoria URI Format <ul><li>Data Service URL (special WCF service) </li></ul><ul><li>Entity Set Name (eg Customers) </li></ul><ul><ul><li>Optional Predicate </li></ul></ul><ul><li>Navigation Property (eg Orders) </li></ul><ul><ul><li>Optional Predicate </li></ul></ul><ul><li>Querystring Options (eg orderby) </li></ul>http://localhost/service.svc/Customers[ALFKI]/Orders?$orderby=City
  37. 37. ADO.NET Data Services
  38. 38. Core Capabilities
  39. 39. Resource Governor <ul><li>Dynamically monitors & controls access to server resources </li></ul>request Resource Pool 1 Resource Pool 2 Workload Group 1 Workload Group 2 MIN, MAX CPU MIN, MAX RAM MIN, MAX CPU MIN, MAX RAM Workload Group 3 Workload Group 1 Priority Max Request Memory Max Request CPU Time Max DOP Max Requests classify()
  40. 40. Resource Governor
  41. 41. Guiding Procedure Execution <ul><li>More control & visibility of stored procedure execution to aid predictable execution </li></ul><ul><ul><li>sp_create_plan_guide accepts XML Showplan output </li></ul></ul><ul><ul><li>sp_create_plan_guide_from_cache </li></ul></ul><ul><ul><li>sys.fn_validate_plan_guide </li></ul></ul><ul><ul><li>Plan guides visibile in Management Studio </li></ul></ul><ul><li>Monitoring </li></ul><ul><ul><li>Events – Plan Guide (Un)Successful </li></ul></ul><ul><ul><li>Counters – (Mis)Guided Plan Executions/Sec </li></ul></ul><ul><ul><ul><li>on SQL Statistics object </li></ul></ul></ul>
  42. 42. Guiding Procedure Execution
  43. 43. Performance Studio <ul><li>Unified framework for capturing “metrics” from SQL Server </li></ul>schedule <ul><li>Interfaces </li></ul><ul><ul><li>Mgmt Studio </li></ul></ul><ul><ul><li>S’procs </li></ul></ul><ul><ul><li>API </li></ul></ul><ul><ul><li>Dashboard UI post SQL 2008 </li></ul></ul>Data Collector Collection Set Collection Set Collection Set Collection Item Collection Item Collection Item Counter, SQL trace or SQL query
  44. 44. Data Collector
  45. 45. Extended Events (XEvent) <ul><li>High performance eventing system for SQL </li></ul><ul><ul><li>Integrates with Event Tracing for Windows (ETW) </li></ul></ul><ul><ul><li>Possibility of end-to-end tracing </li></ul></ul><ul><li>DDL for managing event sessions on a server </li></ul>“ When” to log Where to send it Data to log Filters
  46. 46. Extended Events
  47. 47. Auditing (not in current CTP) <ul><li>Written to files or event logs </li></ul><ul><ul><li>Server level auditing </li></ul></ul><ul><ul><ul><li>Login, Logoff, Create DB, etc. (many) </li></ul></ul></ul><ul><ul><li>Database level auditing </li></ul></ul><ul><ul><ul><li>Changes to Users, Roles, Schema, etc. (many) </li></ul></ul></ul><ul><ul><li>Granular level auditing </li></ul></ul><ul><ul><ul><li>CRUD + EXECUTE on tables, views, procedures, etc. </li></ul></ul></ul>AUDIT UPDATE ON Employee [BY User1]
  48. 48. Platform Enhancements <ul><li>Transparent Data Encryption (TDE) </li></ul><ul><ul><li>Encrypt my data on disk transparent to applications </li></ul></ul><ul><li>Database Compression (not in CTP5) </li></ul><ul><ul><li>ROW / PAGE Compression </li></ul></ul><ul><li>Integrated Full Text Search (not in CTP5) </li></ul><ul><ul><li>Easier to deploy / manage and better performance </li></ul></ul><ul><li>Declarative Management Framework </li></ul><ul><ul><li>Establish policies for monitoring or compliance </li></ul></ul>
  49. 49. Platform Enhancements
  50. 50. MSDN in the UK <ul><li>Visit http://msdn.co.uk </li></ul><ul><ul><li>Newsletter </li></ul></ul><ul><ul><li>Events </li></ul></ul><ul><ul><li>Screencasts </li></ul></ul><ul><ul><li>Blogs </li></ul></ul>

×