Tuesday, March 18, 2008

A future world without the SQL Server Image/Text/NText data types. Now's the time to start planning for that future...

Jose Barreto's Blog - SQL Server 2008 and Unstructured Data

"SQL Server 2008 introduces two new options to store unstructured data, in addition to the current BLOB support we have in SQL Server 2005.

IMAGE

Back in SQL Server 2000 and SQL Server 7 days, we used the IMAGE data type to store binary large objects (a.k.a. BLOBs). Large, by the way, is defined as anything that would not fit a SQL Server data page (around 8,000 bytes). This data type is still present in SQL Server 2005 today, but it should be going away soon. The current recommendation is to “avoid using these data types in new development work, and plan to modify applications that currently use them.”  This applies also to the similar TEXT and NTEXT data types. [GD: Emphasis added]

This is described in more detail at http://msdn2.microsoft.com/en-us/library/ms187993.aspx.

VARBINARY

To replace those, SQL Server 2005 introduced the concept of using the VARBINARY(MAX) data type....

FILESTREAM

A new option in SQL Server 2008 is to use a FILESTREAM attribute in a VARBINARY column. This allows you to store the actual data on the server’s file system...

RBS

SQL Server 2008 also introduces a new client-side API that allows for storing BLOBs on a Remote BLOB store (RBS).

..."

SQL Server 2005 Books Online (September 2007) - ntext, text, and image (Transact-SQL)

"Important:

ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.

..."

We've been warned. SQL Server 2011 without the Image/Text/NText data types? Could be...

1 comment:

Anonymous said...

Why would Microsoft not make Image/Text/NText data types backwardly compatible? Would this mean all older tables would break on SQL Server 2011? That just does not make sense to me.