SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie Intro to the New Data Types in SQL 2008

Intro to Hadoop
Intro to HadoopIntro to Hadoop
Intro to Hadoop
jeffturner
 
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_Dean
Hiroshi 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 Data
Safe Software
 
Hive ICDE 2010
Hive ICDE 2010Hive ICDE 2010
Hive ICDE 2010
ragho
 
HIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopHIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on Hadoop
Zheng Shao
 

Ähnlich wie 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...
 

Mehr von Sarah Dutkiewicz

Mehr von 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
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
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
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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/