Client/SQL Interfacing - Web Service Testing

Client applications may be built from one of several different programming languages. There are two main approaches to integrating these programming languages with the execution of SQL queries: (1) embedded SQL (ESQL) and (2) SQL call-level interface (CLI). Embedded SQL statements must be precompiled for the target programming language and target database (using vendor-specific precompilers). Structured Query Language statements must be recompiled for each supported SQL vendor. Every change made to source code requires recompilation of all vendor-specific SQL statements. Therefore, embedded SQL statements complicate application installation and deployment. They make the development of commercial-off-the-shelf (COTS) products more challenging. With SQL CLI (as opposed to ESQL), applications execute SQL statements and stored procedures to access data.

Microsoft Approach to CLI
Open Database Connectivity (ODBC) is a Microsoft version of SQL CLI. As illustrated in Figure 11.7, it is used for accessing data in heterogeneous environments of relational and nonrelational database management systems (DBMSs). Think of ODBC as a transfer protocol that is used to move data between Web applications and SQL servers. Open Database Connectivity is based on the CLI specifications of the SQL access group. In theory, it provides an open, vendor-neutral means of accessing data that is stored in disparate PC and mainframe databases. With ODBC, application developers may enable an application to simultaneously access, view, and modify the data of multiple database types.

ODBC layers

ODBC layers

As illustrated in Figure, Microsoft's object-oriented approach to CLI is through OLE DB's ActiveX Data Objects (ADO). OLE DB is Microsoft's application program interface (API). It offers applications access to multiple data sources. OLE DB offers Microsoft SQL ODBC capabilities and access capabilities to data types other than MS SQL. ActiveX Data Objects is an object-oriented interface that provides data access features to applications via object and class interfaces instead of procedural APIs. The data request process runs as follows: initialize OLE, connect to a data source object, execute acommand, process the returned results, release the data source object, and uninitialize OLE.

For example, if the Web application under test supplies data to users with an Oracle database, you would include ADO program statements in an Active Server Page–(ASP-) based HTML file. When a user submits requests for a page with data from the database, the requested page would include appropriate data returned from the database, obtained using ADO code. To make this work, Microsoft and database suppliers provide a program interface layer between the database and Microsoft's OLE DB. OLE DB is the underlying system service of ADO that a developer uses.

Microsoft ADO/OLE DB layers

Microsoft ADO/OLE DB layers

Java Approach to CLI
As illustrated in Figure 11.9, the Java object-oriented approach to CLI is Java Database Connectivity (JDBC). Similar to Microsoft's approach, JDBC provides a CLI that can be accessed via an object interface. The JDBC provides two sets of standard interfaces: one for application developers and the other for database developers.

JDBC layers

JDBC layers


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Web Service Testing Topics