INTRODUCTION conversion or marshaling is required, and that

INTRODUCTION conversion or marshaling is required, and that means faster execution. SQL Server 2005 s internal ADO.NET provider, known as System.Data. SqlServer, also contains optimizations such as the SqlExecution Context class, which allows .NET procedural code to share an execution environment (including Connection and Transaction) with its caller. .NET procedures can run in the security context of the user that cataloged the procedure or of the current user. The SQL Server internal managed provider is discussed in Chapter 4. The SQL:1999 Standard Extending the Relational Model Many of the interesting changes to the programmability and data type extensions in SQL Server 2005 are related to ongoing changes to the SQL standard, so it is instructive here to take a look at that standard. SQL:1999 is the latest version of ANSI standard SQL, although at this writing a newer version yet, known as SQL:2003, is in progress. Some of the features added to standard SQL in SQL:1999 have always been part of SQL Server, such as triggers. The more interesting features of SQL:1999 have to do with extending the type system to support extended scalar types, distinct types, and even complex types. In SQL Server 2005, you can add a new scalar type to the relational type system yourself, without waiting for Microsoft to implement it in the engine. The most common use case for SQL Server 2005 user-defined types will be to add new scalar types. A distinct type extends simple data types (such as INTEGERor VARCHAR) with special semantics. For example, a JPEG data type may be defined. This type is stored as an IMAGEdata type in SQL Server, but the IMAGEtype is extended with user-defined functions such as get_background_color and get_foreground_color. Extending a simple type by adding behaviors was inspired by object-relational databases of the mid-1990s. Adding functions to the simple IMAGE type enables SQL queries that accomplish a task, such as select all the rows in the database where the JPEG column x has a background color of red. Without the user-defined functions to extend the type, the IMAGEwould have to be decomposed into one or more relational tables for storage. As an alternative, the background color could be stored separately from the IMAGE, but this could introduce update anomalies if the IMAGE was updated but the background color was not. SQL:1999 codified the definition of the distinct type and defined some rules for its use. As an example, if the JPEGtype and the GIF type are both distinct types that use an underlying storage type of IMAGE, JPEGtypes and

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Java Web Hosting services

Bookmark the permalink.

Comments are closed.