Presentation is loading. Please wait.

Presentation is loading. Please wait.

Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.

Similar presentations


Presentation on theme: "Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies."— Presentation transcript:

1 Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies management and administration  Returns results via SOAP and XML  New HTTP ENDPOINT object  Encourage database object re-use  Support service oriented architectures  Easy maintenance via loose coupling SOAP/XML /HTTP SP TSQL SP SP Non Windows configure connection info configure authentication expose stored procedures expose TSQL batches Web Svc Endpoints Note: Requires Windows 2003 Server

2 Data Types  CLR-based Data Types  VARCHAR(MAX), VARBINARY(MAX)  XML Datatype

3 .Net Framework  Common Language Runtime Integration Ability to create database objects such as UDFs and Stored Procedures with VB.Net. To expose a Stored Procedure: The containing class must be public The exposed method must be public The exposed method must be static (C#) or Shared (VB)

4 .Net Framework  CLR-basedFunctions, & Triggers  CLR-based Types, Functions, & Triggers Developers are able to create two new objects: user-defined types and aggregates. Using VB or C# code, you can write your own aggregator functions, such as those which select results based on string or numerical properties or calculations—something you can't do in T-SQL.

5 Custom Aggregate  CLR Class  Class is called during the aggregation  Not just passed a set of values, but one at a time  Must be serializable (for intermediate results)  Must implement known methods  Init  Called at the start of the aggregation of fields  Accumulate  Called once for each row being aggregated. It is passed the value from the column being aggregated.  Merge  Called to merge a temporary result into the aggregate  Terminate  Called at the end of the aggregation process to retrieve the result of the aggregation.  CLR Class  Class is called during the aggregation  Not just passed a set of values, but one at a time  Must be serializable (for intermediate results)  Must implement known methods  Init  Called at the start of the aggregation of fields  Accumulate  Called once for each row being aggregated. It is passed the value from the column being aggregated.  Merge  Called to merge a temporary result into the aggregate  Terminate  Called at the end of the aggregation process to retrieve the result of the aggregation.

6 Custom UDTs   UDTs behave just like any other data type on the server. You can create tables with UDT columns, use UDTs as variables to stored procedures, pass them as parameters, and so on. You can define UDTs using any.NET language.   They expose properties and methods that can be invoked from T-SQL on the SQL Server.   On the client side, you can use a UDT as you would any other object. After referencing the assembly containing the UDT class, you can use that class from within your data access layer ADO.NET code.   UDTs behave just like any other data type on the server. You can create tables with UDT columns, use UDTs as variables to stored procedures, pass them as parameters, and so on. You can define UDTs using any.NET language.   They expose properties and methods that can be invoked from T-SQL on the SQL Server.   On the client side, you can use a UDT as you would any other object. After referencing the assembly containing the UDT class, you can use that class from within your data access layer ADO.NET code.

7 Possible Uses   Validate Zip Codes as part of INSERT or UPDATE with a Web Service call   User defined type of zip-code.   Field constraint that validates email address format using a regular expression.   Others ?? Speak up audience !! Imagine the possibilities …   Validate Zip Codes as part of INSERT or UPDATE with a Web Service call   User defined type of zip-code.   Field constraint that validates email address format using a regular expression.   Others ?? Speak up audience !! Imagine the possibilities …

8 .NET Integration Choices  Choice of where to run logic  Database, for logic that runs close to data  Mid-tier, for logic that scales out  Symmetric programming model (same in code & db)  Leverage skills middle tier & server  Choice of programming language  VB.NET for a safe, modern execution environment  T-SQL continues to be supported & enhanced  Remains good choice for data-intensive procedures  Safe extended stored proc (xp) replacement  Much higher performance for some scenarios

9 .Net Framework  Benefits: Your critical.Net processes gain the enforcement, security, scalability, and high availability characteristics of SQL Server 2005

10 VS 2005 Project Assembly: “taxlib.dll” VB.Net VB.Net Build SQL Server SQL Data Definition: SQL Data Definition: create assembly … create function … create procedure … create trigger … create type … SQL Queries: tax(sal,state) select sum(tax(sal,state)) from Employee where county = 'King' Runtime hosted by SQL (in-proc) The Developer Experience -Integrated Development and Debugging - GridView control integration

11 Managing Assemblies  Loaded and stored inside SQL Server  Cataloged with CREATE ASSEMBLY  Dropped with DROP ASSEMBLY  Collated as sets of files  Assembly, References, PDB, source files

12 Managing Assemblies  Code Access Security (CAS) for Assemblies  Three CAS Buckets  SAFE  Access to the CLR only  No access to external resources, thread management, unsafe code or interop  EXTERNAL_ACCESS  Access to external systems through the.NET Framework  E.g. EventLog, FileSystem and Network  No access unsafe or interop  UNSAFE  No restrictions; similar to extended stored procedures


Download ppt "Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies."

Similar presentations


Ads by Google