Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 10, 2008

New Data Types in SQL Server 2008

Learn more about new data types such as DATE and TIME, spatial, and FILESTREAM data types
RSS
Subscribe to Windows IT Pro | See More Products / Software Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Review: SQL Server 2008

SQL Server 2008 provides a number of useful new data types. These data types include

  • HIERARCHYID: HIERARCHYID is a variable-length system data type that’s designed to address the problem of tracking tree structures such as organization charts. HIERACHYID can store data optimized for either depth or breadth.
  • GEOGRAPHY: The integration of mapping capabilities into many applications makes the new SQL Server 2008 spatial data types, such as GEOGRAPHY, a welcome addition. The GEOGRAPHY data type is a Microsoft .NET Framework–based spatial data type and uses a round-earth model. This data type stores points, lines, polygons, and collections of latitude and longitude coordinates.
  • GEOMETRY: GEOMETRY is another .NET-based and spatial data type. Unlike the GEOGRAPHY type, which is designed primarily for navigation and mapping on a round-earth model, the GEOMETRY data type is Open Geospatial Consortium (OGC) compliant and uses a flat-earth model.
  • DATE: A native SQL data type, the new DATE data type is ANSI compliant and uses the format YYYY-MM-DD. The DATE data type can contain values from 0001-01-01 to 9999-12-31.
  • TIME: Another native SQL data type, TIME complements the new DATE data type. TIME uses an hh:mm:ss[.nnnnnnn] format and can contain values from 00:00:00.0000000 to 23:59.59.9999999.
  • DATETIME2: The DATETIME2 data type addresses the need for more precise date-time storage and is accurate up to 100 nanoseconds. The DATETIME2 data type uses the format YYYY-MM-DD hh:mm:ss[.nnnnnnn] and can store values ranging from 0001-01-01 00:00:00.0000000 through 9999-12-31 23:59.59.9999999.
  • DATETIMEOFFSET: The most advanced of the new date-time data types, DATETIMEOFFSET is like DATETIME2 but is time-zone aware. DATETIMEOFFSET use the format YYYY-MM-DD hh:mm:ss[.nnnnnnn] and can store values ranging from 0001-01-01 00:00:00.0000000 through 9999-12-31 23:59.59.9999999.
  • FILESTREAM: The FILESTREAM data type combines the performance of file-system streaming APIs with the transactional integrity of a relational database. The FILESTREAM data type enables SQL Server to combine unstructured data and is stored in the NTFS file system with the relational database engine. The SQL Server engine manages the link between the FILESTREAM columns and files in the file system, including backing up and restoring file system data.

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


SQL Server and Database Whitepapers StoreVault SnapManagers for Microsoft Exchange and SQL Server

Related Events Microsoft BI Unleashed | Online Conference

Storage Consolidation for Your Microsoft Applications: Reducing Cost and Complexity

SQL Server 2008 – Can You Wait? | Philadelphia

Check out our list of Free Email Newsletters!

SQL Server and Database eBooks Safeguarding Your Windows Servers

SQL Server Administration for Oracle DBAs

Taking Control: Monitoring the Windows Platform Proactively

Related SQL Server and Database Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing