MSSQL SERVER 2008 New Features for Developers
来源:互联网 发布:jdk java se v1.8 编辑:程序博客网 时间:2024/06/05 11:47
Data Types
MSSQL Server 2k8 contains some new datatypes. These are DATE, TIME and some CLR based types.
DATE type stores only date without time. And TIME type stores only time withouth date. J It was alittle hard work to use date functions for time actions. I think these types can help us.
There is an another type for date. DATETIME2, is similir to standart DATETIME but allows for greater precision. The range of the type is Jan 1 year 1 to 12/31/9999. So it wont be a problem to store DateTime.MinValue with this type. Also the clock is 24 hour cycle so 8 pm can be stored as the military time 20:00.
SELECT CAST('2007-10-20 20:30:05.1234567' as DATETIME2)
Results: 2007-10-20 20:30:05.1234567
SELECT CAST('2007-10-20 20:30:05.1234567' as DATETIME2(4))
Results: 2007-10-20 20:30:05.1235
Values that need to be time zone aware can now be stored in Mssql Server 2k8 with the DATETIMEOFFSET.
SELECT CAST('2007-10-20 20:30:05.1234567 +5:0' as DATETIMEOFFSET)
Results: 2007-10-20 20:30:05.1234567 +05:00
Demos :
CAST('2007-10-20 20:30:05.1234567 +5:0' as DATE) = 2007-10-20
CAST('2007-10-20 20:30:05.1234567 +5:0' as TIME(7)) = 20:30:05.1234567
CAST('2007-10-20 20:30:05.123' as SMALLDATETIME) = 2007-10-20 20:30:00
CAST('2007-10-20 20:30:05.123' as DATETIME) = 2007-10-20 20:30:05.123
CAST('2007-10-20 20:30:05.1234567 +5:0' as DATETIME2(7)) = 2007-10-20 20:30:05.1234567
CAST('2007-10-20 20:30:05.1234567 +5:0' as DATETIMEOFFSET(7)) = 2007-10-20 20:30:05.1234567 +05:00
FILESTREAM Data type
We always think where to store our BLOB files, in the FileSystem or in to the DB. It is hard desicion between them. You can store your files in to the db with filesystem support. For more details i think you should read this post : http://blogs.msdn.com/manisblog/archive/2007/10/21/filestream-data-type-sql-server-2008.aspx
HIERARCHYID
When do we need to have parent – child relationship we create a foreignKey to the table itself. So HierarchyID type will make it easy and it has some helpful funtions.Details on here :http://blogs.msdn.com/manisblog/archive/2007/08/17/sql-server-2008-hierarchyid.aspx
http://blogs.msdn.com/manisblog/archive/2007/08/28/sql-server-2008-hierarchyid-part-ii.aspx
GEOGRAPHY
Spatial data types means businesses and products can now handle complex location data and apply it against other business or technical specific data without requiring expense GIS systems.
Now we are able to insert many records to be inserted using VALUES clause of the INSERT statement.
INSERT INTO SalesFeed(CustomerID, Product, SaleAmount)VALUES(1,'PoolTable', 1000),(2,'BigScreen', 955),(3,'Computer', 590),(4,'BigScreen', 880),(5,'Computer', 700)
There is a new Linq2Sql provider for sql server 2008.
There are some comprassion features, some more new T-SQL enchantments. I wantted to list these features that i like and I want to notice that Microsoft will stop supporting ms sql server 2000 in April 08’.
I hope it helps..
原文地址:http://www.dogaoztuzun.com/post/MSSQL-SERVER-2008-New-Features-for-Developers.aspx
- MSSQL SERVER 2008 New Features for Developers
- Oracle Database 11g: New Features for DBAs and Developers
- SQL Server 2008 New Features 1/3
- SQL Server 2008 New Features 2/3
- SQL Server 2008 New Features 3/3
- New ios books for developers
- What's New for MFC Developers?(zz)
- What"s New for MFC Developers?(翻译)
- What's New for MFC Developers?(翻译)
- Android Nougat new Features for developer
- Microsoft SQL Server 2005 New Features
- New replication features in SQL Server 2008 and what they mean to you
- Visual C++ .NET What's New for MFC Developers?
- Visual C++ .NET: What's New for MFC Developers?
- Visual C++ .NET: What's New for MFC Developers?
- Windows Vista for Developers – A New Series
- 50 New Resources and Tools for Developers and Designers
- Ocp: Oracle 10g New Features For Administrators : Study Guide
- 我的DotNet学习历程
- 网页中样式50例
- 琐事
- LY RTOS for WinAVR
- 功能点估算法(四)
- MSSQL SERVER 2008 New Features for Developers
- SAP BC427 课程中文自学笔记
- 流量统计分析基础
- 进制转换
- HTML中Meta的大作用
- 通过URL前缀实现网页和程序交互
- 软件项目管理基础知识(上)
- 西北最引以为傲的IDC!光辉互联!
- Java 1.6 DB derby 设置使用心得