SQL Server 2008 : Demystifying Data Types - Computed Columns

1/24/2011 4:41:57 PM
A computed column is calculated from an expression that can use other columns in the same table. The expression can be a noncomputed column name, constant, function, and any combination of these connected by one or more operators. The expression cannot be a subquery. Computed columns are virtual and are not physically stored in the table. The computed column is recalculated every time the computed column is referenced in a query. The expression used for the computed column is stored in the Computed Column Specification column properties.

An example of a computed column can be found in the Sales.SalesOrderHeader table in the AdventureWorks2008 database. See Figure 10.1 for an example of the computed column properties.

Figure 1. Computed Column Properties


Be able to define computed columns and explain how they are created.

Filestream Data Type


You have a great deal of information to keep track of. You’ve gotten this far ... You are doing great!

New in SQL Server 2008, the FILESTREAM storage attribute can be used for binary (BLOB) data to be stored in a varbinary(max) column.

Utilizing the FILESTREAM storage attribute has the following benefits:

  • Since the data is stored on the file system, performance matches the streaming performance of the file system.

  • The BLOB size is only restricted by the file system volume size.

  • The FILESTREAM columns are fully integrated with SQL Server maintenance operations, such as backup and restore.

  • SQL Server provides full transactional support between the relational data in the database and the unstructured data physically stored on the file system.

  • The SQL Server security model is used to manage FILESTREAM data.


Be sure to be familiar with the new features, such as FILESTREAM storage, available in SQL Server 2008.

In order for this storage attribute to be used, an attribute can be set on a varbinary column so that the data is stored on the file system. Doing this gains the benefits of the fast streaming and storage capabilities of the file system. The data is managed and accessed directly within the context of the database. The data is stored in the local NTFS file system and not in the database file.

Top 10
SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
The latest Audi TT : New angles for TT
Era of million-dollar luxury cars
Game Review : Hearthstone - Blackrock Mountain
Game Review : Battlefield Hardline
Google Chromecast
Keyboards for Apple iPad Air 2 (part 3) - Logitech Ultrathin Keyboard Cover for iPad Air 2
Keyboards for Apple iPad Air 2 (part 2) - Zagg Slim Book for iPad Air 2
Keyboards for Apple iPad Air 2 (part 1) - Belkin Qode Ultimate Pro Keyboard Case for iPad Air 2
Michael Kors Designs Stylish Tech Products for Women
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
Popular Tags
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Exchange Server Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe Photoshop CorelDRAW X5 CorelDraw 10 windows Phone 7 windows Phone 8 Iphone