In this session, you will learn to: Understand managed code Create managed database objects Define the Hypertext Transfer Protocol endpoints Implement.

Slides:



Advertisements
Similar presentations
Web Services & EAI.
Advertisements

Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Siebel Web Services Siebel Web Services March, From
An Approach to Wrap Legacy Applications into Web Services Wesal Al Belushi, Youcef Baghdadi Department of Computer Science, Sultan Qaboos University, Sultanate.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
CIS-764 Database Design Service-Oriented Architecture and Web-Services Binti Sepaha.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
1 Introduction to SOA. 2 The Service-Oriented Enterprise eXtensible Markup Language (XML) Web services XML-based technologies for messaging, service description,
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Technical Architectures
A New Computing Paradigm. Overview of Web Services Over 66 percent of respondents to a 2001 InfoWorld magazine poll agreed that "Web services are likely.
CSE 636 Data Integration Web Services.
Interpret Application Specifications
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Service Broker Lesson 11. Skills Matrix Service Broker Service Broker, provides a solution to common problems with message delivery and consistency that.
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
Integrating XML with Microsoft SQL Server ©NIITeXtensible Markup Language/Lesson 9/Slide 1 of 31 Objectives In this lesson, you will learn to: * Generate.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
Introduction to .Net Framework
Data Integration Problem How to access data across 22 different data systems, most operating on different hardware, using different software, and having.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
What are Webservices?. Web Services  What are Web Services?  Examine important Web Services acronyms (UDDI, SOAP, XML and WSDL)  What are the benefits.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Enabling Embedded Systems to access Internet Resources.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
Web Service Bright + Ong. Meaning A collection of protocols and standards used for exchanging data between applications or systems Written in various.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
Chapter 6 : Designing SQL Server Service-Level Security MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Dr. Azeddine Chikh IS444: Modern tools for applications development.
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
Kemal Baykal Rasim Ismayilov
Slide 1 of 19Session 13 Ver. 1.0 Querying and Managing Data Using SQL Server 2005 In this session, you will learn to: Implement stored procedures Implement.
CSIT 220 (Blum)1 Remote Procedure Calls Based on Chapter 38 in Computer Networks and Internets, Comer.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
© 2013, published by Flat World Knowledge Chapter 10 Understanding Software: A Primer for Managers 10-1.
Introduction to Web Services. Agenda Motivation History Web service model Web service components A walkthrough examples.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Web services In this presentation… –what is a web service? –web service benefits –web service standards –web service definitions –web service actions.
Web Services An Introduction Copyright © Curt Hill.
.NET Mobile Application Development XML Web Services.
Endpoints Lesson 17. Skills Matrix Endpoints Endpoints provide a reliable, securable, scalable messaging system that enables SQL Server to communicate.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
In this session, you will learn to: Implement triggers Implement transactions Objectives.
SQL Server 2005:.NET Framework Programming in the Database Tim Sneath Architectural Engineer, Microsoft
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
In this session, you will learn to: Manage databases Manage tables Objectives.
SAP Integration with Oracle 11g Muhammad Raza Fatmi.
12. DISTRIBUTED WEB-BASED SYSTEMS Nov SUSMITHA KOTA KRANTHI KOYA LIANG YI.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Technologies IT230 Dr Mohamed Habib.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Wsdl.
Module 10: Implementing Managed Code in the Database
Distributed System using Web Services
Presentation transcript:

In this session, you will learn to: Understand managed code Create managed database objects Define the Hypertext Transfer Protocol endpoints Implement the Hypertext Transfer Protocol endpoints for Web services Objectives

CLR integration: Allows the database developer to write the code in any of the.NET supported languages Allows to run managed code within a database Provides the following functions and services required for program execution Introduction to SQL Server CLR Integration

Managed database objects can be created in the following situations: To implement complicated programming logics To access external resources To implement a CPU-intensive functionality that can run more efficiently as compared to the managed code. T-SQL statements can be used in the following situations: To perform data access and manipulation operations that can be done using the T-SQL statements. To implement programming logic tat can be easily implemented using T-SQL programming constructs. Identifying the Need for Managed Code

Just a minute Which of the following is supported by.NET and not by T-SQL? 1.Writing queries 2.Creating procedures 3.Object-Orientation 4.Writing triggers Answer: 3.Object-Orientation

Assemblies: Are created to attach the managed code Are created using the CREATE ASSEMBLY command Syntax: CREATE ASSEMBLY assembly_name FROM { | [,...n ] } [ WITH PERMISSION_SET = { SAFE | EXTERNAL_ACCESS | UNSAFE } ] Let’s see how… Importing and Configuring Assemblies

Just a minute Which of the following PERMISSION_SET will you use to access another database server? 1.SAFE 2.EXTERNAL_ACCESS 3.UNSAFE Answer: 2.EXTERNAL_ACCESS

Managed database objects can be of the following types: Stored Procedures Functions Triggers UDTs Creating Managed Database Objects

Managed stored procedure: Is implemented by creating a procedure that refers to an imported assembly Syntax: CREATE PROCEDURE AS EXTERNAL NAME.., Let’s see how… Creating Managed Database Objects (Contd.)

Managed function: Is implemented by creating a function that refers to an imported assembly Syntax: CREATE FUNCTION ( ) RETURNS AS EXTERNAL NAME.<Type Name>. Let’s see how… Creating Managed Database Objects (Contd.)

Managed trigger: Is implemented by creating a trigger that refers to an imported assembly Syntax: CREATE TRIGGER ON AS EXTERNAL NAME.. Let’s see how… Creating Managed Database Objects (Contd.)

Managed user-defined type: Is created by using the CREATE TYPE command Syntax: CREATE TYPE [ schema_name. ] type_name { FROM base_type [ (precision [, scale ] ) ] [ NULL | NOT NULL ] | EXTERNAL NAME assembly_name[.class_name] } Let’s see how… Creating Managed Database Objects (Contd.)

Just a minute When will you use managed code instead of T-SQL? 1.When you need to write queries. 2.When you need to access external resources. 3.When you need to perform an administrative task on the database. Answer: 2.When you need to access external resources.

Problem Statement: The management of AdventureWorks, Inc. has decided that they want to include the details of the spouse of employees in the database. The application that is used to enter the employee detail will accept the name and date of birth of the spouse of an employee. In addition, it will concatenate the two values separated by a ";". As a database developer, you need to store the spouse details in the following format: Spouse Name: ; Spouse Date of Birth : To implement this, you have decided to create a managed user-defined data type. How will you create this data type? Demo: Implementing Managed User-Defined Types

Solution: To solve the preceding problem, you need to perform the following tasks: 1.Enable CLR in the database. 2.Create an assembly. 3.Create a managed database user-defined data type. 4.Create a table that will implement the user-defined data type. 5.Verify the output. Demo: Implementing Managed User-Defined Types (Contd.)

SOA: Is an extension of distributed computing based on the request/reply design pattern Modularizes the business logic of an application and presents them as services Allows to create objects, such as, Web services that can be accessed from heterogeneous systems Introduction to Service-Oriented Architecture (SOA)

Flash presentation: Introduction to Web ServicesIntroduction to Web Services Web Service is a collection of methods that provide programmable logic used by client applications over the Internet. SQL Server 2005 provides native XML Web services by using the following open standards: Hypertext Transfer Protocol (HTTP) Simple Object Access Protocol (SOAP) Web Services Definition Language (WSDL) Introduction to Web Services

Just a minute Which of the following describes the Web services? 1.WSDL 2.SOAP 3.UDDI Answer: 1.WSDL

Just a minute Which of the following helps in finding a Web service? 1.WSDL 2.SOAP 3.UDDI Answer: 3.UDDI

HTTP Endpoint: Is the gateway through which HTTP-based clients can query the database server Created for use with SQL Server 2005 can listen and receive requests on the TCP port (port 80) Identifying the Role of HTTP Endpoints in Native Web Service Architecture

Identifying the Role of HTTP Endpoints in Native Web Service Architecture (Contd.) HTTP Endpoint Architecture:

Just a minute On which of the following ports does the SQL Server listen for HTTP requests? Answer: 1.80

Involves the following tasks: 1.Creating the required database code to access the data. 2.Creating an HTTP Endpoint using the CREATE ENDPOINT statement. Creating HTTP Endpoints

Syntax: CREATE ENDPOINT endpoint_name STATE = { STARTED | STOPPED | DISABLED } AS HTTP ( AUTHENTICATION =( { BASIC | DIGEST | INTEGRATED | NTLM | KERBEROS }, PATH = 'url', PORTS = (CLEAR) ) FOR SOAP( [ { WEBMETHOD [ 'namespace'.] 'method_alias' ( NAME = 'database.owner.name' [, SCHEMA = { NONE | STANDARD | DEFAULT } ] [, FORMAT = { ALL_RESULTS | ROWSETS_ONLY } ]) } [,...n ] ] [ BATCHES = { ENABLED | DISABLED } ] [, WSDL = { NONE | DEFAULT | 'sp_name' } ] Let’s see how… Creating HTTP Endpoints (Contd.)

Just a minute While creating an HTTP Endpoint, which of the following format will you use to return only the result set to the user? 1.ROWSET_ONLY 2.ALL_RESULT 3.NONE Answer: 1.ROWSET_ONLY

Problem Statement: The database server of AdventureWorks, Inc. is located at Bothell. The organization has various offices located at various locations spread across the globe. According to the requirements, the users need to access the data of all the employees at various locations. Users might need to use PDAs or mobile phones to access these details. As a database developer, you have decided to implement a Web service that allows the users to access the data using the Internet. How will you implement this service inside the AdventureWorks database? Demo: Implementing HTTP Endpoints

Solution: To solve the preceding problem, you need to perform the following tasks: 1.Create a procedure. 2.Create an HTTP Endpoint for SOAP. 3.Verify the creation of HTTP endpoint. ` Demo: Implementing HTTP Endpoints (Contd.)

In this session, you learned that: The database objects created in any of the.NET supported languages are called managed database objects. CLR integration provides the following benefits: Better programming model Common development environment Ability to define data types T-SQL can be used to perform data access and manipulation operations that can be implemented using the programming constructs provided by T-SQL. Summary

Managed database objects can be used in the following situations: To implement complicated programming logic for which you can reuse the functionality provided by the.NET base class libraries. To access external resources, such as calling a Web service or accessing the file system. To implement a CPU-intensive functionality that can run more efficiently as compared to the managed code. By default, the SQL Server does not allow running managed code on the server. Before creating a managed database object in your database, the CLR integration feature should be enabled in the database using the sp_configure stored procedure. The.NET code that is used to create the managed database objects is compiled in.NET assemblies,.dll or.exe files. To create a managed database object, first first the.NET assemblies are imported in the database engine. Summary (Contd.)

The assemblies in the database engine can be given any of the following three permissions: SAFE EXTERNAL_ACCESS UNSAFE Managed stored procedure can be created using the CREATE PROCEDURE command. Managed function can be created using the CREATE FUNCTION command. Managed trigger can be created using the CREATE TRIGGER command. Managed data type can be created using the CREATE TYPE command. A Web service is the piece of code that is exposed over the Internet. Summary (Contd.)

Web services have following advantages: Interoperability Multilanguage support Reusing existing applications SOAP is a standard communication protocol to interchange information in a structured format in a distributed environment. WSDL is a markup language that describes a Web service. UDDI provides a standard mechanism to register and discover a Web service. HTTP endpoints allow you to create and use Web services within the SQL Server. Before creating an HTTP endpoint, you need to first create stored procedures or functions that form a Web service. Summary (Contd.)

HTTP endpoints provide the users with a connecting point through which they can access the implemented functions. You can create HTTP endpoints by using the CREATE ENDPOINT statement. Summary (Contd.)