Part V. Programming the Oracle Database with Web Services

Unless you have been living in a cave for the last four or five years, you have repeatedly heard about Web services and service-oriented architecture (SOA) as the new trend in IT, which allows resource consolidation, virtualization, and provisioning for optimized use, thereby reducing IT costs.

In Part I, we looked at Java within the database. In Part II, II, and IV, we looked at the APIs for persisting Java states or retrieving SQL data; the resulting code may run either within the database (i.e., manipulate the data in situ) or as a Java applet, Java EE framework/component, or stand-alone Java SE application/framework connected to the database.

In Part V, we’ll switch our focus from programming the database with Java to programming the database with Web services. As we will see, the exact term would be “assembling database Web services” but the association of “database” and “Web services” immediately raises eyebrows and the following questions:

What do Web services have to do with databases in general and the Oracle database in particular?

What will Web services assemblers get from the integration of Web services with the database? Will they have to learn SQL and PL/SQL programming?

What will database developers, DBAs, and data architects get from the integration of the database with Web services? Will they have to learn Java and/or Web services technologies or APIs?

Chapter 14 introduces the Web services technology and the service-oriented architecture for database developers, DBAs, and data architects (those familiar with these concepts and technologies may skip this chapter). Chapter 15 describes how you can turn your Oracle database into a Web services provider. Chapter 16 describes how you can configure your Oracle database to invoke external Web services from SQL, PL/SQL, and Java in the database. For starters, let’s (re)visit the rationales for coupling Web services with the Oracle database.

Rationales for Database Web Services

Chances are you have already heard about Web services as additional means for accessing and manipulating data in the database and, conversely, as means for the database to reach external services. According to an Evans Data Corporation survey among database developers (Winter 2004), “More than two out of three respondents, 68%, say they are in the process of exposing or invoking their database operations through standard Web services mechanisms.”

As another sign of the growing importance of database Web services, the leading RDBMS vendors, including Oracle, DB2, and SQL Server, furnish support with their database in a more or less integrated fashion. A summary of their implementations, the pros and cons, and how these compare is beyond the scope of this book. However, Chapter 15 contrasts the current implementation of Oracle database Web services with alternative implementation.

Motivations for exposing Oracle database functionality as Web services:

  • Reuse existing database applications, such as PL/SQL packages and Java classes in the database, as Web services.

  • Implement your own database-centric Web services, such as catalog services (i.e., Amazon Web services) and search services (i.e., Google Web services, Yahoo Web services) using database functionality[1] (i.e., SQL, PL/SQL, Streams/AQ, and Java).

  • Furnish new database-centric Web services such as XML documents storage and retrieval e.g., client applications can insert new XML documents or retrieve existing ones from a central corporate database, edit locally, and finally store the updated document; and client applications can transmit audit and logging information to the database for archiving.

  • Turn your database into a first-class member of your SOA.

    Motivations for invoking external Web services from the database:

  • Allow your Oracle database to consume data produced by external Web services.

  • Federate legacy/heterogeneous data; build new applications that combine data from multiple sources, including Web services.

  • Implement automated applications, such as parcel tracking, stock prices tracking and analysis, scientific data tracking and analysis, maintain/refresh policies and/or tax tables, and weather information tracking and analysis.

  • Invoke business operations implemented as external Web services, such as placing new orders based on defined thresholds (i.e., number of products in inventory), batch processing of orders shipment, and batch processing of orders payment (using valid authorization numbers).



[1] I am not implying that Yahoo, Google, and Amazon use database operations to implement their Web services.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.93.169