Question 3


Answer A is correct. The CLR now facilitates a user-defined type (UDT) that can include business logic and processing. Although you do not want to overuse this facet, it works well in this situation. A trigger will not work because the processing for a trigger occurs after the data enters the column, not before. Constraints are not applicable because they prevent values and restrict data, and they do no other processing. A computed column will work for simple calculations, but in more complex scenarios UDTs are better.

For more information, see the following sources:

  • Chapter 2, "Creating Database Objects"

  • SQL Server 2005 Books Online: "SQL Server Database Engine, Accessing and Changing Database Data, Elements of Transact-SQL, Data Types (Database Engine), Working with CLR User-defined Types, Using and Modifying Instances of User-defined Types"

  • "CLR User-Defined Types," http://msdn2.microsoft.com/en-us/library/ms131120.aspx

  • Within MSDN Library, go to MSDN Home, MSDN Library, Enterprise Servers and Development, SQL Server, SQL Server 2005 Documentation, SQL Server 2005 Books Online, SQL Server Programming Reference, Database Engine .NET Framework Programming, Building Database Objects with Common Language Runtime (CLR) Integration, CLR User-Defined Types.




MCTS 70-431(c) Implementing and Maintaining Microsoft SQL Server 2005
MCTS 70-431 Exam Cram: Implementing and Maintaining Microsoft SQL Server 2005 Exam
ISBN: 0789735881
EAN: 2147483647
Year: 2006
Pages: 200
Authors: Thomas Moore

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net