SlideShare a Scribd company logo
Eric Nelson Developer Evangelist [email_address]  – I will reply http://blogs.msdn.com/ericnel  - tends to be about .NET and data http://blogs.msdn.com/goto100   - all about Visual Basic http://twitter.com/ericnel  - pot luck :-) http://blogs.msdn.com/ukdevevents  The ONLY LINK you need!
First PC –  ZX80  in 1980 (then  BBC Micro ,  Atari 520STFM  and  Macintosh LC ) First computer job...  FORTAN  in 1986 Wrote most LOC on... Unix using C Favourite IDE of all time ... GNU Emacs Joined  Microsoft DRG  in 1996 Early adoption work on ASP, SQL 6.5,  MTS ... Went “Back to development” in July 2008 – in  VB I Geek to Live (not Live to Geek) I am editor of the  UK MSDN Flash I am  fascinated by  ALT.NET  values and practices http://blogs.msdn.com/ukdevevents  The ONLY LINK you need!
I live near Bath with wife, 2 kids, 1 dog (and many pet graves in the garden) I originally intended to be a naval officer I am very shy...seriously! http://blogs.msdn.com/ukdevevents  The ONLY LINK you need!
Sign up to the MSDN Flash Feedback, vote etc Technical articles for the UK MSDN Flash 400 to 500 words War stories around VB6 to .NET Your right (or left) arm in the air  NB: not all the time  
Give a flavour of the  new “stuff” in SQL Server 2008  for development  and   an insight into the direction  we are taking with data
TSQL Enhancements SQL-2006 Major and minor Beyond Relational Filestream Full text search  Spatial Semi-structured Futures* Object Relational Management SQL Data Services In one hour
Released August 6 th  2008 Many versions!
 
Date & Time Date types Table value constructor using VALUES clause MERGE Table Types and Table Value Parameters GROUPING SET SQL language IDE improvements Compound assignment operators Declaring and initializing variables Delighters
IDE Improvements Debugging is back! Intellisense has made it in Compound Assignment operators: +=, -=, *=, /= Variable initialization during declaration UPDATE Inventory SET quantity  +=  s.quantity FROM Inventory AS i INNER JOIN Sales AS s ON i.id = s.id DECLAER @v  int = 5 ; DECLARE @v1  varchar(10) = ‘xxxxx’;
 
Insert multiple rows based on values in a single INSERT statement SQL 2006 standard compatible INSERT INTO dbo.Customers(custid, companyname, phone, address)    VALUES    (1, 'cust 1', '(111) 111-1111', 'address 1'),    (2, 'cust 2', '(222) 222-2222', 'address 2'),    (3, 'cust 3', '(333) 333-3333', 'address 3'),    (4, 'cust 4', '(444) 444-4444', 'address 4'),    (5, 'cust 5', '(555) 555-5555', 'address 5');
Single statement that combines multiple DML operations Operates on a join between source and target SQL-2006 compliant UPDATE TGT SET TGT.quantity = TGT.quantity + SRC.quantity, TGT.LastTradeDate = SRC.TradeDate FROM dbo.StockHolding AS TGT JOIN dbo.StockTrading AS SRC ON TGT.stock = SRC.stock; INSERT INTO dbo.StockHolding (stock, lasttradedate, quantity) SELECT stock, tradedate, quantity FROM dbo.StockTrading AS SRC WHERE NOT EXISTS (SELECT * FROM dbo.StockHolding AS TGT WHERE TGT.stock = SRC.stock); MERGE  INTO dbo.StockHolding AS TGT USING  dbo.StockTrading AS SRC ON  TGT.stock = SRC.stock WHEN MATCHED  AND (t.quantity + s.quantity = 0)  THEN DELETE WHEN MATCHED THEN  UPDATE SET t.LastTradeDate = s.TradeDate,  t.quantity += s.quantity WHEN NOT MATCHED THEN INSERT VALUES  (s.Stock,s.TradeDate,s.Quantity) Pre-SQL 2008 SQL 2008
Source Table (Stock Trading) Target Table (Stock Holding) Merged Table (Stock Holding) INSERT UPDATE DELETE
A new user defined type - Table Can define indexes and constraints Can be used for  declaring table variables Input parameters of Table type on SPs/Functions Optimized to scale and perform better for large data Behaves like BCP inside server In ADO.NET SqlDbType.Structured CREATE TYPE myTableType AS TABLE  (id INT, name NVARCHAR(100),qty INT); CREATE PROCEDURE myProc  (@tvp myTableType READONLY ) AS …
Define multiple groupings in the same query Produces a single result set that is equivalent to a UNION ALL of differently grouped rows SQL 2006 standard compatiable SELECT customerType,Null as TerritoryID,MAX(ModifiedDate) FROM Sales.Customer  GROUP BY  customerType UNION ALL SELECT Null as customerType,TerritoryID,MAX(ModifiedDate) FROM Sales.Customer  GROUP BY  TerritoryID order by TerritoryID SELECT customerType,TerritoryID,MAX(ModifiedDate) FROM Sales.Customer  GROUP BY  GROUPING SETS  ((customerType), (TerritoryID)) order by customerType Pre-SQL 2008 SQL 2008
 
 
CREATE TABLE Employee { FirstName VARCHAR(10), LastName VARCHAR(10), Birthday DATE , … } SELECT  Birthday  AS BirthDay FROM Employee INSERT INTO T (datetime2_col) VALUES (‘ 1541 -01-01’) INSERT INTO T (time_col) VALUES (’12:30:29 .1176548 ’) CREATE TABLE online-purchase-order { item-id int, item-name VARCHAR(30), qty int, purchase-time datetimeoffset, … } // For value ‘ 2005-09-08 12:20:19.345 -08:00 ’ INSERT INTO online-purchase-order VALUES (…., ‘ 2005-09-08 12:20:19.345 -08:00’  ,..)  Large year range (1~9999) Storage saving Easy programming DATE Large or optional precision (0 ~ 100ns) Easy programming TIME Large year range Large or optional precision DATETIME2 Datetime + time zone offset UTC enabled Easy programming DATETIME OFFSET
 
 
SQL Server 2005 SQL Server 2008 HierarchyID Large UDTs Sparse Columns Wide Tables Filtered Indices XML Upgrades User Defined Types XML Data Type and Functions Full Text Indexing Filestream Integrated FTS Fully supported Geometry and Geography data types and Functions Relational  Semi Structured Documents &  Multimedia Spatial
Remote BLOB Storage FILESTREAM Storage SQL BLOB Documents &  Multimedia Use File Servers DB Application BLOB Dedicated BLOB Store DB Application BLOB Store BLOBs in Database DB Application BLOB Store BLOBs in DB + File System Application BLOB DB
Storage Attribute on VARBINARY(MAX) Works with integrated FTS Unstructured data stored directly in the file system (requires NTFS) Dual Programming Model TSQL (Same as SQL BLOB) Win32 Streaming APIs with T-SQL transactional semantics Advantages Integrated Manageability SQL Server Security Stack Dual model Documents &  Multimedia Store BLOBs in DB + File System Application BLOB DB
 
Full-Text Engine and Indexes fully integrated Catalog, index and stopword lists now inside the database Better performance in many common scenarios Make mixed queries perform and scale Optimizer has knowledge about FT index SELECT * FROM candidates  WHERE CONTAINS(resume,’”SQL Server”’)  AND ZipCode = ‘98052’ Documents &  Multimedia
Populating an index of 20million rows of 1k data on identical hardware (time in minutes) 2 min 1 min Documents &  Multimedia
Proliferation of geographical data GPS Systems, Virtual Earth, Live Search Maps etc New opportunities for spatially aware apps Storage and retrieval of spatial data using standard SQL New Spatial Data Types + methods + indexes  geometry  - Flat Earth (Planar)  geography  - Round Earth (Geodetic)  Offers full set of Open Geospatial Consortium components Spatial
 
1 2 3 4 5 1 3 4 5 2 // Create a Filtered Indexes // Sparse column Create Table Products(Id int, Type nvarchar(16)…,  Resolution int  SPARSE , ZoomLength int  SPARSE ); // Filtered Indices Create Index ZoomIdx on Products(ZoomLength)  where Type = ‘Camera’; // HierarchyID  CREATE TABLE [dbo].[Folder] ( [FolderNode]  HIERARCHYID  NOT NULL UNIQUE, [Level] AS  [FolderNode].GetLevel()  PERSISTED, [Description] NVARCHAR(50) NOT NULL ); HierarchyID Store arbitrary hierarchies of data and efficiently query them Large UDTs No more 8K limit on User Defined Types Sparse Columns Optimized storage for sparsely populated columns Wide Tables Support thousands of sparse columns Filtered Indices Define indices over subsets of data in tables Relational  Semi Structured
 
 
 
What is it? Technique for working with relational tables  as if they were objects  in memory Intention is to  hide away the complexity  of the underlying tables and give a uniform way of working with data Why use it? Productivity Retain database independence Which ORM? There are many ORMs for .NET developers already in existence. E.g. LLBLGen Pro  http://www.llblgen.com/ Nhibernate  http://www.hibernate.org/343.html EntitySpaces  http://www.entityspaces.net/Portal/Default.aspx
LINQ to SQL .NET Framework 3.5, Nov 2007 Only SQL Server Simple Easy to learn and master LINQ to Entities ( ADO.NET Entity Framework ) .NET Framework 3.5 SP1, Aug 2008 “ Any” RDBMS Complex Easy to learn, hard to master Strategic
 
 
HTTP (AtomPub) Clients (Tools, Libraries, etc) SQL Data Services ADO.NET Data Services Framework SQL Server (On premises data service) (Cloud data service)
Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server
Unit of geo-location and billing Tied to DNS name Collection of Containers
Entity properties may differ in type and instance
 
 
 
 
Drop me an email if I confused you about anything! [email_address]   http:// blogs.msdn.com/ UKDevEvents Post event resources for all Microsoft UK developer focused sessions The team Eric Nelson  http://blogs.msdn.com/ericnel   Mike Ormond  http://blogs.msdn.com/mikeormond   Mike Taulty  http://mtaulty.com

More Related Content

PDF
Redshift performance tuning
PPTX
04 spark-pair rdd-rdd-persistence
PDF
SparkSQL and Dataframe
PDF
Data Source API in Spark
PDF
Hive Functions Cheat Sheet
PDF
Tactical data engineering
PPTX
U-SQL Query Execution and Performance Tuning
PDF
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Redshift performance tuning
04 spark-pair rdd-rdd-persistence
SparkSQL and Dataframe
Data Source API in Spark
Hive Functions Cheat Sheet
Tactical data engineering
U-SQL Query Execution and Performance Tuning
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...

What's hot (18)

PPTX
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
ODT
ACADILD:: HADOOP LESSON
PDF
Spark Dataframe - Mr. Jyotiska
PDF
A Rusty introduction to Apache Arrow and how it applies to a time series dat...
PDF
Introduction to Spark SQL & Catalyst
PPTX
Spark meetup v2.0.5
PDF
Trivadis TechEvent 2016 Big Data Cassandra, wieso brauche ich das? by Jan Ott
PDF
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
PPTX
cPanel now supports MySQL 8.0 - My Top Seven Features
PDF
Rmarkdown cheatsheet-2.0
PDF
SQL to Hive Cheat Sheet
PDF
Devtools cheatsheet
PDF
Trivadis TechEvent 2016 Polybase challenges Hive relational access to non-rel...
PPTX
A Step by Step Introduction to the MySQL Document Store
PPT
ADO.NET
PDF
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
PDF
Pivoting Data with SparkSQL by Andrew Ray
PPT
Hive User Meeting August 2009 Facebook
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
ACADILD:: HADOOP LESSON
Spark Dataframe - Mr. Jyotiska
A Rusty introduction to Apache Arrow and how it applies to a time series dat...
Introduction to Spark SQL & Catalyst
Spark meetup v2.0.5
Trivadis TechEvent 2016 Big Data Cassandra, wieso brauche ich das? by Jan Ott
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
cPanel now supports MySQL 8.0 - My Top Seven Features
Rmarkdown cheatsheet-2.0
SQL to Hive Cheat Sheet
Devtools cheatsheet
Trivadis TechEvent 2016 Polybase challenges Hive relational access to non-rel...
A Step by Step Introduction to the MySQL Document Store
ADO.NET
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Pivoting Data with SparkSQL by Andrew Ray
Hive User Meeting August 2009 Facebook
Ad

Similar to SQL Server 2008 Overview (20)

PPT
SQL Server 2008 for .NET Developers
PPT
Tech Days09 Sqldev
PPT
SQL Server 2008 for Developers
PPT
Windows Azure and a little SQL Data Services
PPT
SQL Server 2008 for Developers
PPT
Sql Summit Clr, Service Broker And Xml
PDF
Spark SQL Deep Dive @ Melbourne Spark Meetup
PPTX
Introducing U-SQL (SQLPASS 2016)
PDF
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
PPT
What's New for Data?
PPT
SQL Server 2008 for Developers
PDF
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
PPT
PO WER - Piotr Mariat - Sql
PDF
Complete SQL in one video by shradha.pdf
PPTX
Dev Sql Beyond Relational
PPT
dbs class 7.ppt
PPT
Building Applications for SQL Server 2008
PPT
Ms sql server architecture
PDF
esProc introduction
PDF
Sql tutorial
SQL Server 2008 for .NET Developers
Tech Days09 Sqldev
SQL Server 2008 for Developers
Windows Azure and a little SQL Data Services
SQL Server 2008 for Developers
Sql Summit Clr, Service Broker And Xml
Spark SQL Deep Dive @ Melbourne Spark Meetup
Introducing U-SQL (SQLPASS 2016)
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
What's New for Data?
SQL Server 2008 for Developers
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
PO WER - Piotr Mariat - Sql
Complete SQL in one video by shradha.pdf
Dev Sql Beyond Relational
dbs class 7.ppt
Building Applications for SQL Server 2008
Ms sql server architecture
esProc introduction
Sql tutorial
Ad

More from Eric Nelson (20)

PPT
SQL Azure Dec 2010 Update
PPT
SQL Azure Dec Update
PPT
Windows Azure Platform in 30mins by ericnel
PPTX
Technology Roadmap by ericnel
PPTX
Windows Azure Platform in 30mins by ericnel
PDF
10 things ever architect should know about the Windows Azure Platform - ericnel
PDF
Lap around the Windows Azure Platform - ericnel
PDF
Windows Azure Platform best practices by ericnel
PDF
Windows Azure Platform: Articles from the Trenches, Volume One
PPT
Looking at the clouds through dirty windows
PPT
SQL Azure Overview for Bizspark day
PPT
Building An Application For Windows Azure And Sql Azure
PPT
Entity Framework 4 In Microsoft Visual Studio 2010
PPTX
Windows Azure In 30mins for none technical audience
PPT
Dev305 Entity Framework 4 Emergency Slides
PPTX
Design Considerations For Storing With Windows Azure
PPTX
What Impact Will Entity Framework Have On Architecture
PPTX
Windows Azure Overview
PPTX
SQL Data Service Overview
PPTX
Entity Framework v1 and v2
SQL Azure Dec 2010 Update
SQL Azure Dec Update
Windows Azure Platform in 30mins by ericnel
Technology Roadmap by ericnel
Windows Azure Platform in 30mins by ericnel
10 things ever architect should know about the Windows Azure Platform - ericnel
Lap around the Windows Azure Platform - ericnel
Windows Azure Platform best practices by ericnel
Windows Azure Platform: Articles from the Trenches, Volume One
Looking at the clouds through dirty windows
SQL Azure Overview for Bizspark day
Building An Application For Windows Azure And Sql Azure
Entity Framework 4 In Microsoft Visual Studio 2010
Windows Azure In 30mins for none technical audience
Dev305 Entity Framework 4 Emergency Slides
Design Considerations For Storing With Windows Azure
What Impact Will Entity Framework Have On Architecture
Windows Azure Overview
SQL Data Service Overview
Entity Framework v1 and v2

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

SQL Server 2008 Overview

  • 1. Eric Nelson Developer Evangelist [email_address] – I will reply http://blogs.msdn.com/ericnel - tends to be about .NET and data http://blogs.msdn.com/goto100 - all about Visual Basic http://twitter.com/ericnel - pot luck :-) http://blogs.msdn.com/ukdevevents The ONLY LINK you need!
  • 2. First PC – ZX80 in 1980 (then BBC Micro , Atari 520STFM and Macintosh LC ) First computer job... FORTAN in 1986 Wrote most LOC on... Unix using C Favourite IDE of all time ... GNU Emacs Joined Microsoft DRG in 1996 Early adoption work on ASP, SQL 6.5, MTS ... Went “Back to development” in July 2008 – in VB I Geek to Live (not Live to Geek) I am editor of the UK MSDN Flash I am fascinated by ALT.NET values and practices http://blogs.msdn.com/ukdevevents The ONLY LINK you need!
  • 3. I live near Bath with wife, 2 kids, 1 dog (and many pet graves in the garden) I originally intended to be a naval officer I am very shy...seriously! http://blogs.msdn.com/ukdevevents The ONLY LINK you need!
  • 4. Sign up to the MSDN Flash Feedback, vote etc Technical articles for the UK MSDN Flash 400 to 500 words War stories around VB6 to .NET Your right (or left) arm in the air NB: not all the time 
  • 5. Give a flavour of the new “stuff” in SQL Server 2008 for development and an insight into the direction we are taking with data
  • 6. TSQL Enhancements SQL-2006 Major and minor Beyond Relational Filestream Full text search Spatial Semi-structured Futures* Object Relational Management SQL Data Services In one hour
  • 7. Released August 6 th 2008 Many versions!
  • 8.  
  • 9. Date & Time Date types Table value constructor using VALUES clause MERGE Table Types and Table Value Parameters GROUPING SET SQL language IDE improvements Compound assignment operators Declaring and initializing variables Delighters
  • 10. IDE Improvements Debugging is back! Intellisense has made it in Compound Assignment operators: +=, -=, *=, /= Variable initialization during declaration UPDATE Inventory SET quantity += s.quantity FROM Inventory AS i INNER JOIN Sales AS s ON i.id = s.id DECLAER @v int = 5 ; DECLARE @v1 varchar(10) = ‘xxxxx’;
  • 11.  
  • 12. Insert multiple rows based on values in a single INSERT statement SQL 2006 standard compatible INSERT INTO dbo.Customers(custid, companyname, phone, address)   VALUES   (1, 'cust 1', '(111) 111-1111', 'address 1'),   (2, 'cust 2', '(222) 222-2222', 'address 2'),   (3, 'cust 3', '(333) 333-3333', 'address 3'),   (4, 'cust 4', '(444) 444-4444', 'address 4'),   (5, 'cust 5', '(555) 555-5555', 'address 5');
  • 13. Single statement that combines multiple DML operations Operates on a join between source and target SQL-2006 compliant UPDATE TGT SET TGT.quantity = TGT.quantity + SRC.quantity, TGT.LastTradeDate = SRC.TradeDate FROM dbo.StockHolding AS TGT JOIN dbo.StockTrading AS SRC ON TGT.stock = SRC.stock; INSERT INTO dbo.StockHolding (stock, lasttradedate, quantity) SELECT stock, tradedate, quantity FROM dbo.StockTrading AS SRC WHERE NOT EXISTS (SELECT * FROM dbo.StockHolding AS TGT WHERE TGT.stock = SRC.stock); MERGE INTO dbo.StockHolding AS TGT USING dbo.StockTrading AS SRC ON TGT.stock = SRC.stock WHEN MATCHED AND (t.quantity + s.quantity = 0) THEN DELETE WHEN MATCHED THEN UPDATE SET t.LastTradeDate = s.TradeDate, t.quantity += s.quantity WHEN NOT MATCHED THEN INSERT VALUES (s.Stock,s.TradeDate,s.Quantity) Pre-SQL 2008 SQL 2008
  • 14. Source Table (Stock Trading) Target Table (Stock Holding) Merged Table (Stock Holding) INSERT UPDATE DELETE
  • 15. A new user defined type - Table Can define indexes and constraints Can be used for declaring table variables Input parameters of Table type on SPs/Functions Optimized to scale and perform better for large data Behaves like BCP inside server In ADO.NET SqlDbType.Structured CREATE TYPE myTableType AS TABLE (id INT, name NVARCHAR(100),qty INT); CREATE PROCEDURE myProc (@tvp myTableType READONLY ) AS …
  • 16. Define multiple groupings in the same query Produces a single result set that is equivalent to a UNION ALL of differently grouped rows SQL 2006 standard compatiable SELECT customerType,Null as TerritoryID,MAX(ModifiedDate) FROM Sales.Customer GROUP BY customerType UNION ALL SELECT Null as customerType,TerritoryID,MAX(ModifiedDate) FROM Sales.Customer GROUP BY TerritoryID order by TerritoryID SELECT customerType,TerritoryID,MAX(ModifiedDate) FROM Sales.Customer GROUP BY GROUPING SETS ((customerType), (TerritoryID)) order by customerType Pre-SQL 2008 SQL 2008
  • 17.  
  • 18.  
  • 19. CREATE TABLE Employee { FirstName VARCHAR(10), LastName VARCHAR(10), Birthday DATE , … } SELECT Birthday AS BirthDay FROM Employee INSERT INTO T (datetime2_col) VALUES (‘ 1541 -01-01’) INSERT INTO T (time_col) VALUES (’12:30:29 .1176548 ’) CREATE TABLE online-purchase-order { item-id int, item-name VARCHAR(30), qty int, purchase-time datetimeoffset, … } // For value ‘ 2005-09-08 12:20:19.345 -08:00 ’ INSERT INTO online-purchase-order VALUES (…., ‘ 2005-09-08 12:20:19.345 -08:00’ ,..) Large year range (1~9999) Storage saving Easy programming DATE Large or optional precision (0 ~ 100ns) Easy programming TIME Large year range Large or optional precision DATETIME2 Datetime + time zone offset UTC enabled Easy programming DATETIME OFFSET
  • 20.  
  • 21.  
  • 22. SQL Server 2005 SQL Server 2008 HierarchyID Large UDTs Sparse Columns Wide Tables Filtered Indices XML Upgrades User Defined Types XML Data Type and Functions Full Text Indexing Filestream Integrated FTS Fully supported Geometry and Geography data types and Functions Relational Semi Structured Documents & Multimedia Spatial
  • 23. Remote BLOB Storage FILESTREAM Storage SQL BLOB Documents & Multimedia Use File Servers DB Application BLOB Dedicated BLOB Store DB Application BLOB Store BLOBs in Database DB Application BLOB Store BLOBs in DB + File System Application BLOB DB
  • 24. Storage Attribute on VARBINARY(MAX) Works with integrated FTS Unstructured data stored directly in the file system (requires NTFS) Dual Programming Model TSQL (Same as SQL BLOB) Win32 Streaming APIs with T-SQL transactional semantics Advantages Integrated Manageability SQL Server Security Stack Dual model Documents & Multimedia Store BLOBs in DB + File System Application BLOB DB
  • 25.  
  • 26. Full-Text Engine and Indexes fully integrated Catalog, index and stopword lists now inside the database Better performance in many common scenarios Make mixed queries perform and scale Optimizer has knowledge about FT index SELECT * FROM candidates WHERE CONTAINS(resume,’”SQL Server”’) AND ZipCode = ‘98052’ Documents & Multimedia
  • 27. Populating an index of 20million rows of 1k data on identical hardware (time in minutes) 2 min 1 min Documents & Multimedia
  • 28. Proliferation of geographical data GPS Systems, Virtual Earth, Live Search Maps etc New opportunities for spatially aware apps Storage and retrieval of spatial data using standard SQL New Spatial Data Types + methods + indexes geometry - Flat Earth (Planar) geography - Round Earth (Geodetic) Offers full set of Open Geospatial Consortium components Spatial
  • 29.  
  • 30. 1 2 3 4 5 1 3 4 5 2 // Create a Filtered Indexes // Sparse column Create Table Products(Id int, Type nvarchar(16)…, Resolution int SPARSE , ZoomLength int SPARSE ); // Filtered Indices Create Index ZoomIdx on Products(ZoomLength) where Type = ‘Camera’; // HierarchyID CREATE TABLE [dbo].[Folder] ( [FolderNode] HIERARCHYID NOT NULL UNIQUE, [Level] AS [FolderNode].GetLevel() PERSISTED, [Description] NVARCHAR(50) NOT NULL ); HierarchyID Store arbitrary hierarchies of data and efficiently query them Large UDTs No more 8K limit on User Defined Types Sparse Columns Optimized storage for sparsely populated columns Wide Tables Support thousands of sparse columns Filtered Indices Define indices over subsets of data in tables Relational Semi Structured
  • 31.  
  • 32.  
  • 33.  
  • 34. What is it? Technique for working with relational tables as if they were objects in memory Intention is to hide away the complexity of the underlying tables and give a uniform way of working with data Why use it? Productivity Retain database independence Which ORM? There are many ORMs for .NET developers already in existence. E.g. LLBLGen Pro http://www.llblgen.com/ Nhibernate http://www.hibernate.org/343.html EntitySpaces http://www.entityspaces.net/Portal/Default.aspx
  • 35. LINQ to SQL .NET Framework 3.5, Nov 2007 Only SQL Server Simple Easy to learn and master LINQ to Entities ( ADO.NET Entity Framework ) .NET Framework 3.5 SP1, Aug 2008 “ Any” RDBMS Complex Easy to learn, hard to master Strategic
  • 36.  
  • 37.  
  • 38. HTTP (AtomPub) Clients (Tools, Libraries, etc) SQL Data Services ADO.NET Data Services Framework SQL Server (On premises data service) (Cloud data service)
  • 39. Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Data Access Lib SDS Runtime REST / SOAP Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server Mgmt. Services Distributed Data Fabric SQL Server
  • 40. Unit of geo-location and billing Tied to DNS name Collection of Containers
  • 41. Entity properties may differ in type and instance
  • 42.  
  • 43.  
  • 44.  
  • 45.  
  • 46. Drop me an email if I confused you about anything! [email_address] http:// blogs.msdn.com/ UKDevEvents Post event resources for all Microsoft UK developer focused sessions The team Eric Nelson http://blogs.msdn.com/ericnel Mike Ormond http://blogs.msdn.com/mikeormond Mike Taulty http://mtaulty.com