Quantcast
Channel: Paul Nielsen : fun
Viewing all articles
Browse latest Browse all 7

the real story behind the new TinyGUID data type

$
0
0

A popular new data type that almost didn't make it in SQL Server 2008 will be available in CPT7. The new TinyGUID data type is similar to the full UniqueIdentifier data type except that, as the name implies, it's only 3 characters long– 29 characters less than the GUID saving 14 bytes, but still providing 46,656 (363) max values. The NewTinyID() function generates the values.

The intended application of the TinyGUID data type is for smaller look-up tables that require uniqueness for replication but not the massive number of values required for a larger table.

Microsoft had been pressured for several releases by the various state division of motor vehicles to implement the TinyGUID data type. The application of generating license plate numbers was an obvious need.

If they can slice datetime into date and time data types, why can’t they drop 29 characters off the GUID? Huh?” – Tom the DBA, Colorado State DMV

But, revealed only here in SQLBlog.com, there’s more to the new data type than just pressing license plates in the prison. The powers that be in some state’s departments were offended by the addition of DMVs within SQL Server 2005,

How dare they presume to call anything a DMV. We were the original DMV long before Bill Gates got his driver’s license for that fancy-shmancy red Porsche of his.” –Tom the other DBA, Colorado State DMV.

Facing yet another frustrating legal battle against the government, Microsoft reached a compromise with key states to include the TinyGuid data type if the states would drop their law suits.

So, for those wondering of SQL Server 2008 is truly a major release, that question has now been settled.

 


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images