SlideShare uma empresa Scribd logo
1 de 23
Introduction to the New Data
  Types in SQL Server 2008


                      Sarah Dutkiewicz
             sarah@codinggeekette.com
New Types in SQL 2008




               HIERARCHICAL   GEOSPATIAL   FILESTREAM
DATE/TIME
New Date/Time Data Types
                    DATETIME

              2008-08-28 12:32:54.720


    DATE                                 TIME

 2008-08-28                        12:32:54.720


                   DATETIME2

           2008-08-28 12:32:54.7214690


                 DATETIMEOFFSET

      2008-08-28 12:32:54.7214690 -04:00
DATETIME vs DATETIME2

           DATETIME                     DATETIME2
           2008-08-28 12:32:54.720      2008-08-28 12:32:54.7214690

Accuracy   333 ns                       100 ns
Range      1753/01/01-9999/12/31        0001/01/01 – 9999/12/31

                                        6-8 bytes*
Storage    8 bytes




                           *6 bytes for precisions less than 3; 7 bytes for
                           precisions 4 and 5. All other precisions require
                           8 bytes. The default precision is 7.
DATETIMEOFFSET

       DATETIME2                                                    OFFSET

2008-08-28 12:32:54.7214690                                          -04:00




                                        DATETIMEOFFSET

                              2008-08-28 12:32:54.7214690 -04:00


                                DATETIMEOFFSET is stored in 10 bytes – 8 bytes for
                                the DATETIME2 part and 2 bytes for the OFFSET.

                                The offset is based on the UTC and is not fully time-
                                zone aware.
New DATETIME Functions
Function              Example                          Return Datatype


GETDATE()             2008-08-28 12:32:54.720          DATETIME
GETUTCDATE()          2008-08-28 16:32:54.720          DATETIME
SYSDATETIME()         2008-08-28 12:32:54.7214690      DATETIME2
SYSUTCDATETIME()      2008-08-28 16:32:54.7214690      DATETIME2

SYSDATETIMEOFFSET()   2008-08-28 12:32:54.7214690 -04:00 DATETIMEOFFSET
HIERARCHYID

A data type to store hierarchical representations.

Not limited to organizational charts. Other ideas include:
HIERARCHYID Considerations
Provides storage and methods to work with hierarchical data


Indexes are handled in depth-first but can also be set up breadth-first.


Does NOT enforce relationships – that is left for the application


Does NOT enforce uniqueness


No guidance for creating hierarchies – hierarchyid values need to be
assigned at the application level.
HIERARCHYID Methods
           • Parse
Display    • ToString




           •   GetRoot
           •   GetAncestor
Position   •   GetDescendant
           •   IsDescendant
           •   GetLevel
HIERARCHYID Representation

    PositionID     Path                 PositionTitle

1   0x             /                    President

2   0x58           /1/                  Treasurer


Methods
                       • Parse – returns the PositionID (binary data)
         Display         representation
                       • ToString – returns the Path (human readable)
                         representation
HIERARCHYID Demo

                                           President (/)



                  Speakers Lead   Sponsors Lead      Venue Lead   Volunteers
Treasurer (/1/)                                                                    Swag Lead (/6/)
                      (/2/)           (/3/)             (/4/)     Lead (/5/)


                                                                     Volunteer 1      Book Publishers
                                                                       (/5/1/)        Contact (/6/1/)


                                                                     Volunteer 2         Software
                                                                       (/5/2/)         Contact (/6/2/)


                                                                     Volunteer 3
                                                                       (/5/3/)
Isn’t that Spatial?




GEOGRAPHY            GEOMETRY
GEOGRAPHY vs GEOMETRY

Great for location-tracking and other mapping applications!

            GEOGRAPHY                   GEOMETRY

Standards   WGS84 (GPS) and Open        Well-Known Text (WKT)
            Geospatial Consortium       Well-Known Binary (WKB)
            standards (WKT, WKB, GML)   Geographic Markup Language
                                        (GML)
Type        Geodetic (Round Earth)      Planar
Geospatial Demos




Round Earth    Planar Coordinates
Coordinates
FILESTREAM
FILESTREAM Instead of BLOB

                      BLOB                  FILESTREAM


Storage               In Database           In NTFS filesystem
Filestreaming         Slow due to storage   Quicker, using NTFS
                                            streaming APIs
Caching               Uses SQL caching      Uses Windows caching
FILESTREAM Setup
  Enable FILESTREAM at the
        Instance level




      Create filegroup




       Create table with
   varbinary(max) column
  with FILESTREAM attribute
FILESTREAM Advantages

Allows association of unstructured files to structured data

Uses Windows APIs and cache, making it better performance-wise for
streaming than from a BLOB for larger files

SQL backup and recovery models support these files

Can use SQL queries to work with the unstructured files

FILESTREAM data is protected by SQL permissions
FILESTREAM Disadvantages

No current support for in-place updates.

 quot;Updatesquot; to columns with FILESTREAM create new files and then
 change the file pointer.

 Old file is deleted at garbage collection – log backup, database
 backup, or checkpoint for simple recovery.
FILESTREAM Limitations

Databases with FILESTREAM data cannot be configured for database
mirroring.

Database snapshots are not supported for FILESTREAM data.

Native encryption is not possible by SQL SERVER for FILESTREAM data.
More SQL Server Presentations
• quot;Query Tuning in SQL Server 2005 and 2005quot;
  by Chris Barth
• quot;SQL Server Service Brokerquot; by Josef Finsel
• quot;Automating SQL Server Administrative Tasks
  with PowerShellquot; by Allen White
• quot;Test Driven Development for TSQLquot; by Phil
  Japikse
Resources
• SQL Server 2008 Books Online:
  http://msdn.microsoft.com/en-
  gb/library/ms130214.aspx
• SQL Server Express WebLog:
  http://blogs.msdn.com/sqlexpress/
• Sample SQL 2008 Databases:
  http://www.codeplex.com/MSFTDBProdSamples/Relea
  se/ProjectReleases.aspx
• Jason Follas’ series on Spatial Data:
  http://tinyurl.com/spatialdataseries
• Open Geospatial Consortium:
  http://www.opengeospatial.org/
Contact Information


Blog: http://www.codinggeekette.com
Email: sarah@codinggeekette.com

Mais conteúdo relacionado

Semelhante a Intro to the New Data Types in SQL 2008

Data exchange alternatives, SBIS conference in Stockholm (2008)
Data exchange alternatives, SBIS conference in Stockholm (2008)Data exchange alternatives, SBIS conference in Stockholm (2008)
Data exchange alternatives, SBIS conference in Stockholm (2008)Dag Endresen
 
FAQ on Dedupe NetApp
FAQ on Dedupe NetAppFAQ on Dedupe NetApp
FAQ on Dedupe NetAppAshwin Pawar
 
Using spider for sharding in production
Using spider for sharding in productionUsing spider for sharding in production
Using spider for sharding in productionKentoku
 
Introduction to MapReduce Data Transformations
Introduction to MapReduce Data TransformationsIntroduction to MapReduce Data Transformations
Introduction to MapReduce Data Transformationsswooledge
 
Intro to Hadoop
Intro to HadoopIntro to Hadoop
Intro to Hadoopjeffturner
 
Whats New At Qad(8.6toe B2.1)
Whats New At Qad(8.6toe B2.1)Whats New At Qad(8.6toe B2.1)
Whats New At Qad(8.6toe B2.1)shashikantgp
 
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォーム
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォームPivotal Greenplum 次世代マルチクラウド・データ分析プラットフォーム
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォームMasayuki Matsushita
 
Google_A_Behind_the_Scenes_Tour_-_Jeff_Dean
Google_A_Behind_the_Scenes_Tour_-_Jeff_DeanGoogle_A_Behind_the_Scenes_Tour_-_Jeff_Dean
Google_A_Behind_the_Scenes_Tour_-_Jeff_DeanHiroshi Ono
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesBobby Curtis
 
Facebook's Approach to Big Data Storage Challenge
Facebook's Approach to Big Data Storage ChallengeFacebook's Approach to Big Data Storage Challenge
Facebook's Approach to Big Data Storage ChallengeDataWorks Summit
 
DHT2 - O Brother, Where Art Thou with Shyam Ranganathan
DHT2 - O Brother, Where Art Thou with 	Shyam RanganathanDHT2 - O Brother, Where Art Thou with 	Shyam Ranganathan
DHT2 - O Brother, Where Art Thou with Shyam RanganathanGluster.org
 
Hive ICDE 2010
Hive ICDE 2010Hive ICDE 2010
Hive ICDE 2010ragho
 
HIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopHIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopZheng Shao
 
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...Large scale preservation workflows with Taverna – SCAPE Training event, Guima...
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...SCAPE Project
 

Semelhante a Intro to the New Data Types in SQL 2008 (20)

CouchDB
CouchDBCouchDB
CouchDB
 
Handling Big Data
Handling Big DataHandling Big Data
Handling Big Data
 
Data exchange alternatives, SBIS conference in Stockholm (2008)
Data exchange alternatives, SBIS conference in Stockholm (2008)Data exchange alternatives, SBIS conference in Stockholm (2008)
Data exchange alternatives, SBIS conference in Stockholm (2008)
 
Glasgow University Geo Metadata Workshop
Glasgow University Geo Metadata WorkshopGlasgow University Geo Metadata Workshop
Glasgow University Geo Metadata Workshop
 
FAQ on Dedupe NetApp
FAQ on Dedupe NetAppFAQ on Dedupe NetApp
FAQ on Dedupe NetApp
 
Using spider for sharding in production
Using spider for sharding in productionUsing spider for sharding in production
Using spider for sharding in production
 
Introduction to MapReduce Data Transformations
Introduction to MapReduce Data TransformationsIntroduction to MapReduce Data Transformations
Introduction to MapReduce Data Transformations
 
Intro to Hadoop
Intro to HadoopIntro to Hadoop
Intro to Hadoop
 
ΥΛΗ_ΕΠΑΛ_Γ_2223.pdf
ΥΛΗ_ΕΠΑΛ_Γ_2223.pdfΥΛΗ_ΕΠΑΛ_Γ_2223.pdf
ΥΛΗ_ΕΠΑΛ_Γ_2223.pdf
 
Whats New At Qad(8.6toe B2.1)
Whats New At Qad(8.6toe B2.1)Whats New At Qad(8.6toe B2.1)
Whats New At Qad(8.6toe B2.1)
 
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォーム
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォームPivotal Greenplum 次世代マルチクラウド・データ分析プラットフォーム
Pivotal Greenplum 次世代マルチクラウド・データ分析プラットフォーム
 
Google_A_Behind_the_Scenes_Tour_-_Jeff_Dean
Google_A_Behind_the_Scenes_Tour_-_Jeff_DeanGoogle_A_Behind_the_Scenes_Tour_-_Jeff_Dean
Google_A_Behind_the_Scenes_Tour_-_Jeff_Dean
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail Files
 
Facebook's Approach to Big Data Storage Challenge
Facebook's Approach to Big Data Storage ChallengeFacebook's Approach to Big Data Storage Challenge
Facebook's Approach to Big Data Storage Challenge
 
DHT2 - O Brother, Where Art Thou with Shyam Ranganathan
DHT2 - O Brother, Where Art Thou with 	Shyam RanganathanDHT2 - O Brother, Where Art Thou with 	Shyam Ranganathan
DHT2 - O Brother, Where Art Thou with Shyam Ranganathan
 
Hive ICDE 2010
Hive ICDE 2010Hive ICDE 2010
Hive ICDE 2010
 
HIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopHIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on Hadoop
 
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...Large scale preservation workflows with Taverna – SCAPE Training event, Guima...
Large scale preservation workflows with Taverna – SCAPE Training event, Guima...
 

Mais de Sarah Dutkiewicz

Passwordless Development using Azure Identity
Passwordless Development using Azure IdentityPasswordless Development using Azure Identity
Passwordless Development using Azure IdentitySarah Dutkiewicz
 
Predicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksPredicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksSarah Dutkiewicz
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for DevelopersSarah Dutkiewicz
 
Azure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersAzure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersSarah Dutkiewicz
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalSarah Dutkiewicz
 
Noodling with Data in Jupyter Notebook
Noodling with Data in Jupyter NotebookNoodling with Data in Jupyter Notebook
Noodling with Data in Jupyter NotebookSarah Dutkiewicz
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# DevelopersSarah Dutkiewicz
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDDSarah Dutkiewicz
 
Becoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the TrenchesBecoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the TrenchesSarah Dutkiewicz
 
NEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future TechiesNEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future TechiesSarah Dutkiewicz
 
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL ServerThe Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL ServerSarah Dutkiewicz
 
The importance of UX for Developers
The importance of UX for DevelopersThe importance of UX for Developers
The importance of UX for DevelopersSarah Dutkiewicz
 
The Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in TechThe Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in TechSarah Dutkiewicz
 
Unstoppable Course Final Presentation
Unstoppable Course Final PresentationUnstoppable Course Final Presentation
Unstoppable Course Final PresentationSarah Dutkiewicz
 
Even More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX ToolbeltEven More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX ToolbeltSarah Dutkiewicz
 
History of Women in Tech - Trivia
History of Women in Tech - TriviaHistory of Women in Tech - Trivia
History of Women in Tech - TriviaSarah Dutkiewicz
 
The UX Toolbelt for Developers
The UX Toolbelt for DevelopersThe UX Toolbelt for Developers
The UX Toolbelt for DevelopersSarah Dutkiewicz
 

Mais de Sarah Dutkiewicz (20)

Passwordless Development using Azure Identity
Passwordless Development using Azure IdentityPasswordless Development using Azure Identity
Passwordless Development using Azure Identity
 
Predicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksPredicting Flights with Azure Databricks
Predicting Flights with Azure Databricks
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Azure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersAzure DevOps for JavaScript Developers
Azure DevOps for JavaScript Developers
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data Professional
 
Noodling with Data in Jupyter Notebook
Noodling with Data in Jupyter NotebookNoodling with Data in Jupyter Notebook
Noodling with Data in Jupyter Notebook
 
Pairing and mobbing
Pairing and mobbingPairing and mobbing
Pairing and mobbing
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# Developers
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDD
 
Becoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the TrenchesBecoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the Trenches
 
NEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future TechiesNEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future Techies
 
Becoming a Servant Leader
Becoming a Servant LeaderBecoming a Servant Leader
Becoming a Servant Leader
 
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL ServerThe Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
 
The importance of UX for Developers
The importance of UX for DevelopersThe importance of UX for Developers
The importance of UX for Developers
 
The Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in TechThe Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in Tech
 
Unstoppable Course Final Presentation
Unstoppable Course Final PresentationUnstoppable Course Final Presentation
Unstoppable Course Final Presentation
 
Even More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX ToolbeltEven More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX Toolbelt
 
History of Women in Tech
History of Women in TechHistory of Women in Tech
History of Women in Tech
 
History of Women in Tech - Trivia
History of Women in Tech - TriviaHistory of Women in Tech - Trivia
History of Women in Tech - Trivia
 
The UX Toolbelt for Developers
The UX Toolbelt for DevelopersThe UX Toolbelt for Developers
The UX Toolbelt for Developers
 

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Intro to the New Data Types in SQL 2008

  • 1. Introduction to the New Data Types in SQL Server 2008 Sarah Dutkiewicz sarah@codinggeekette.com
  • 2. New Types in SQL 2008 HIERARCHICAL GEOSPATIAL FILESTREAM DATE/TIME
  • 3. New Date/Time Data Types DATETIME 2008-08-28 12:32:54.720 DATE TIME 2008-08-28 12:32:54.720 DATETIME2 2008-08-28 12:32:54.7214690 DATETIMEOFFSET 2008-08-28 12:32:54.7214690 -04:00
  • 4. DATETIME vs DATETIME2 DATETIME DATETIME2 2008-08-28 12:32:54.720 2008-08-28 12:32:54.7214690 Accuracy 333 ns 100 ns Range 1753/01/01-9999/12/31 0001/01/01 – 9999/12/31 6-8 bytes* Storage 8 bytes *6 bytes for precisions less than 3; 7 bytes for precisions 4 and 5. All other precisions require 8 bytes. The default precision is 7.
  • 5. DATETIMEOFFSET DATETIME2 OFFSET 2008-08-28 12:32:54.7214690 -04:00 DATETIMEOFFSET 2008-08-28 12:32:54.7214690 -04:00 DATETIMEOFFSET is stored in 10 bytes – 8 bytes for the DATETIME2 part and 2 bytes for the OFFSET. The offset is based on the UTC and is not fully time- zone aware.
  • 6. New DATETIME Functions Function Example Return Datatype GETDATE() 2008-08-28 12:32:54.720 DATETIME GETUTCDATE() 2008-08-28 16:32:54.720 DATETIME SYSDATETIME() 2008-08-28 12:32:54.7214690 DATETIME2 SYSUTCDATETIME() 2008-08-28 16:32:54.7214690 DATETIME2 SYSDATETIMEOFFSET() 2008-08-28 12:32:54.7214690 -04:00 DATETIMEOFFSET
  • 7. HIERARCHYID A data type to store hierarchical representations. Not limited to organizational charts. Other ideas include:
  • 8. HIERARCHYID Considerations Provides storage and methods to work with hierarchical data Indexes are handled in depth-first but can also be set up breadth-first. Does NOT enforce relationships – that is left for the application Does NOT enforce uniqueness No guidance for creating hierarchies – hierarchyid values need to be assigned at the application level.
  • 9. HIERARCHYID Methods • Parse Display • ToString • GetRoot • GetAncestor Position • GetDescendant • IsDescendant • GetLevel
  • 10. HIERARCHYID Representation PositionID Path PositionTitle 1 0x / President 2 0x58 /1/ Treasurer Methods • Parse – returns the PositionID (binary data) Display representation • ToString – returns the Path (human readable) representation
  • 11. HIERARCHYID Demo President (/) Speakers Lead Sponsors Lead Venue Lead Volunteers Treasurer (/1/) Swag Lead (/6/) (/2/) (/3/) (/4/) Lead (/5/) Volunteer 1 Book Publishers (/5/1/) Contact (/6/1/) Volunteer 2 Software (/5/2/) Contact (/6/2/) Volunteer 3 (/5/3/)
  • 13. GEOGRAPHY vs GEOMETRY Great for location-tracking and other mapping applications! GEOGRAPHY GEOMETRY Standards WGS84 (GPS) and Open Well-Known Text (WKT) Geospatial Consortium Well-Known Binary (WKB) standards (WKT, WKB, GML) Geographic Markup Language (GML) Type Geodetic (Round Earth) Planar
  • 14. Geospatial Demos Round Earth Planar Coordinates Coordinates
  • 16. FILESTREAM Instead of BLOB BLOB FILESTREAM Storage In Database In NTFS filesystem Filestreaming Slow due to storage Quicker, using NTFS streaming APIs Caching Uses SQL caching Uses Windows caching
  • 17. FILESTREAM Setup Enable FILESTREAM at the Instance level Create filegroup Create table with varbinary(max) column with FILESTREAM attribute
  • 18. FILESTREAM Advantages Allows association of unstructured files to structured data Uses Windows APIs and cache, making it better performance-wise for streaming than from a BLOB for larger files SQL backup and recovery models support these files Can use SQL queries to work with the unstructured files FILESTREAM data is protected by SQL permissions
  • 19. FILESTREAM Disadvantages No current support for in-place updates. quot;Updatesquot; to columns with FILESTREAM create new files and then change the file pointer. Old file is deleted at garbage collection – log backup, database backup, or checkpoint for simple recovery.
  • 20. FILESTREAM Limitations Databases with FILESTREAM data cannot be configured for database mirroring. Database snapshots are not supported for FILESTREAM data. Native encryption is not possible by SQL SERVER for FILESTREAM data.
  • 21. More SQL Server Presentations • quot;Query Tuning in SQL Server 2005 and 2005quot; by Chris Barth • quot;SQL Server Service Brokerquot; by Josef Finsel • quot;Automating SQL Server Administrative Tasks with PowerShellquot; by Allen White • quot;Test Driven Development for TSQLquot; by Phil Japikse
  • 22. Resources • SQL Server 2008 Books Online: http://msdn.microsoft.com/en- gb/library/ms130214.aspx • SQL Server Express WebLog: http://blogs.msdn.com/sqlexpress/ • Sample SQL 2008 Databases: http://www.codeplex.com/MSFTDBProdSamples/Relea se/ProjectReleases.aspx • Jason Follas’ series on Spatial Data: http://tinyurl.com/spatialdataseries • Open Geospatial Consortium: http://www.opengeospatial.org/