Oracle Free Tutorial

Web based School

Previous Page Main Page Next Page


2

Oracle and Client/Server

Oracle Corporation's reputation as a database company is firmly established in its full-featured, high-performance RDBMS server. With the database as the cornerstone of its product line, Oracle has evolved into more than just a database company, complementing its RDBMS server with a rich offering of well-integrated products that are designed specifically for distributed processing and client/server applications. As Oracle's database server has evolved to support large-scale enterprise systems for transaction processing and decision support, so too have its other products, to the extent that Oracle can provide a complete solution for client/server application development and deployment. This chapter presents an overview of client/server database systems and the Oracle product architectures that support their implementation.

An Overview of Client/Server Computing

The premise of client/server computing is to distribute the execution of a task among multiple processors in a network. Each processor is dedicated to a specific, focused set of subtasks that it performs best, and the end result is increased overall efficiency and effectiveness of the system as a whole. Splitting the execution of tasks between processors is done through a protocol of service requests; one processor, the client, requests a service from another processor, the server. The most prevalent implementation of client/server processing involves separating the user interface portion of an application from the data access portion.

On the client, or front end, of the typical client/server configuration is a user workstation operating with a Graphical User Interface (GUI) platform, usually Microsoft Windows, Macintosh, or Motif. At the back end of the configuration is a database server, often managed by a UNIX, Netware, Windows NT, or VMS operating system.

Client/server architecture also takes the form of a server-to-server configuration. In this arrangement, one server plays the role of a client, requesting database services from another server. Multiple database servers can look like a single logical database, providing transparent access to data that is spread around the network.

Designing an efficient client/server application is somewhat of a balancing act, the goal of which is to evenly distribute execution of tasks among processors while making optimal use of available resources. Given the increased complexity and processing power required to manage a graphical user interface (GUI) and the increased demands for throughput on database servers and networks, achieving the proper distribution of tasks is challenging. Client/server systems are inherently more difficult to develop and manage than traditional host-based application systems because of the following challenges:

  • The components of a client/server system are distributed across more varied types of processors. There are many more software components that manage client, network, and server functions, as well as an array of infrastructure layers, all of which must be in place and configured to be compatible with each other.

  • The complexity of GUI applications far outweighs that of their character-based predecessors. GUIs are capable of presenting much more information to the user and providing many additional navigation paths to elements of the interface.

  • Troubleshooting performance problems and errors is more difficult because of the increased number of components and layers in the system.

Databases in a Client/Server Architecture

Client/server technologies have changed the look and architecture of application systems in two ways. Not only has the supporting hardware architecture undergone substantial changes, but there have also been significant changes in the approach to designing the application logic of the system.

Prior to the advent of client/server technology, most Oracle applications ran on a single node. Typically, a character-based SQL*Forms application would access a database instance on the same machine with the application and the RDBMS competing for the same CPU and memory resources. Not only was the system responsible for supporting all the database processing, but it was also responsible for executing the application logic. In addition, the system was burdened with all the I/O processing for each terminal on the system; each keystroke and display attribute was controlled by the same processor that processed database requests and application logic.

Client/server systems change this architecture considerably by splitting all of the interface management and much of the application processing from the host system processor and distributing it to the client processor.

Combined with the advances in hardware infrastructure, the increased capabilities of RDBMS servers have also contributed to changes in the application architecture. Prior to the release of Oracle7, Oracle's RDBMS was less sophisticated in its capability to support the processing logic necessary to maintain the integrity of data in the database. For example, primary and foreign key checking and enforcement was performed by the application. As a result, the database was highly reliant on application code for enforcement of business rules and integrity, making application code bulkier and more complex. Figure 2.1 illustrates the differences between traditional host-based applications and client/server applications. Client/server database applications can take advantage of the Oracle7 server features for implementation of some of the application logic.


Figure 2.1. Host-based applications versus client/server applications.

The pre-Oracle7 databases provided little more than data-type checking at the kernel level; but with Oracle7, much of the application logic processing can be performed by the database kernel. Oracle7 contains features such as stored procedures, integrity constraint enforcement, user-defined functions, and database triggers, all of which enable the application to store more of its business rules (or semantics of the data model) at the database level. As a result, the application is freed to do more sophisticated, complex processing tasks such as GUI interface management and integration to other client-based productivity tools. As shown in Figure 2.1, the database is much more robust; no longer is it reliant on application code to maintain its integrity.

Oracle and Client/Server Computing

Oracle Corporation has been a leader in introducing advanced client/server database technologies, directing its product development specifically to support the design, implementation, and management of client/server database systems. Oracle has designed products to support each of the three primary components of a client/server architecture:

  • A full-featured, high-performance RDBMS server, scaleable from laptops to mainframes

  • Client development and run-time products that support multiple GUI environments

  • Database connectivity middleware that provides efficient and secure communications over a wide variety of network protocols

Oracle's product offerings in each area are highly scaleable, providing complete client/server solutions for application environments ranging from small workgroup to global enterprise-wide environments. Figure 2.2 illustrates some of the Oracle products used in client/server and distributed systems.


Figure 2.2. Oracle's client/server products.

The following sections describe several of the primary components of Oracle's client/server architecture, the Oracle7 RDBMS kernel, SQL*Net, and GUI development tools, all designed specifically for client/server application systems.

The Oracle7 RDBMS Server

The Oracle7 server is a full-featured RDBMS that is ideally suited to support sophisticated client/server environments. Many features of the Oracle7 internal architecture are designed to provide high availability, maximum throughput, security, and efficient use of its host's resources. Although all these features are important architecturally for a database server, Oracle7 also contains the following language-based features that accelerate development and improve the performance of server-side application components.

  • PL/SQL language—A major component of the Oracle7 server is its PL/SQL processing engine (the PL stands for Procedural Language). PL/SQL is Oracle's fourth generation language that incorporates structured procedural language elements with the SQL language. PL/SQL is designed specifically for client/server processing in that it enables a PL/SQL program block containing application logic as well as SQL statements to be submitted to the server with a single request.

    By using PL/SQL, you can significantly reduce the amount of processing required by the client portion of an application and the network traffic required to execute the logic. For example, you might want to execute different sets of SQL statements based on the results of a query. The query, the subsequent SQL statements, and the conditional logic to execute them can all be incorporated into one PL/SQL block and submitted to the server in one network trip.

    Not only can PL/SQL be processed by the Oracle7 server, but it can also be processed by SQL*Forms and Oracle Forms. PL/SQL is used extensively by these tools for client-based procedures and event trigger routines. In a client/server environment, PL/SQL is extremely flexible because the language used by client is interchangeable with that used by the server. Some extensions in the client language syntax allow for control of interface components, reference to form objects, and navigation. Figure 2.3 shows the difference between submitting an "anonymous" PL/SQL block and calling a stored procedure.


Figure 2.3. Minimizing network traffic and application code by using PL/SQL.

  • Stored procedures—Although version 6 of Oracle supported server-based PL/SQL, Oracle7 provides the capability to store PL/SQL blocks as database objects in the form of stored procedures, functions, and database packages. Now, portions of the application logic, especially those requiring database access, can reside where they are processed—on the server. Using stored procedures significantly increases the efficiency of a client/server system for several reasons:

  • Calling a stored procedure from a client application generates minimal network traffic. Rather than the application submitting an entire PL/SQL program block from the client, all that is required is a single call to the procedure or function with an optional parameter list.

  • Stored procedures provide a convenient and effective security mechanism. One of the characteristics of stored PL/SQL is that it always executes with the privilege domain of the procedure owner. This enables non-privileged users to have controlled access (through the procedure code) of privileged objects. This feature usually serves to reduce the amount of grant administration that the DBA must do.

  • Both the compiled and textual form of stored procedures are maintained in the database. Because the compiled form of the procedure is available and readily executable, the need to parse and compile the PL/SQL at run time is alleviated.

  • Database triggers—Database triggers resemble stored procedures in that they are database-resident PL/SQL blocks; the difference between the two is that triggers are fired automatically by the RDBMS kernel in response to a commit time event (such as an insert, update, or delete operation). You can use triggers to enforce complex integrity checking, perform complex auditing and security functions, and implement application alerts and monitors. Like stored procedures, database triggers greatly reduce the amount of code and processing that is necessary in the client portion of an application.

    Oracle7's implementation of database triggers is slightly different from that of other vendors. Although most databases support statement-level triggers, Oracle7 also includes functionality to fire triggers at the row-level. Consider an UPDTAE statement that affects values in a set of 100 rows. The kernel would fire a statement-level trigger once—for the UPDATE statement (either before and/or after the statement executes). Row-level triggers, on the other hand, are fired by the kernel for each row that the statement affects—in this case, 100 times. Oracle7 enables statement-level and row-level triggers to be used in conjunction with one another.

  • Declarative integrity—When you define a table in Oracle7, you might include integrity constraints as part of your table definition. Constraints are enforced by the server whenever records are inserted, updated, or deleted. In addition to using referential integrity constraints that enforce primary and foreign key relationships, you can also define your own constraints to control the value domains of individual columns within a table.

    Server-enforced integrity reduces some of the code required for validation by the client and also increases the robustness of the business model defined within the database. With constraints, you can often improve performance and provide the flexibility to support multiple front-end interfaces.

  • User-defined functions—You'll also find PL/SQL blocks in user-defined functions. User-defined functions are similar to stored procedures and also reduce the amount of application code in the client portion of an application. Not only can you call these functions from PL/SQL, but you can also use them to extend the set of standard Oracle SQL functions. You can place user-defined functions in SQL statements just as you would any other Oracle SQL function.

    Designing your Oracle application to make use of these server-based features not only improves the performance of a client/server system but also makes the task of developing and deploying an application easier.

Networking Products

If you're developing an Oracle-based client/server system, you'll probably use Oracle's database networking software to implement connectivity between the nodes in the network. Oracle offers a variety of products and tools that simplify the task of connecting client applications to database servers in a network.

  • SQL*Net—SQL*Net is database messaging software that provides optimal, reliable database messaging over every popular network protocol. SQL*Net is designed to provide server location transparency to any node within an application network and uses components that reside on both the client and server sides of an application.

    In addition to providing connectivity between workstations and servers in a client/server environment, servers also use SQL*Net to communicate with other servers for distributed transactions, remote procedure calls, and table replication. Servers reference other servers using database links that define the names of remote databases, the network nodes where the databases are serviced, and the network protocol used to access the remote nodes. Database links simplify distributed processing by providing transparent access to remote objects such as tables and procedures, enabling an application to reference them just as if they were resident in the application's local database.

  • Oracle Names—With release 7.1 of Oracle7, you can make available database link and network node information to all the nodes in a network using the Oracle Names common global dictionary. This feature is particularly useful for large application networks encompassing multiple locations to simplify the administration of database link and network information.

  • Multi-Protocol Interchange—Whereas Version 1 of SQL*Net supports connectivity between nodes in a single network protocol, Version 2 of SQL*Net enables database communication between nodes in different network communities running different network protocols. The Multi-Protocol Interchange (MPI) provides a communications bridge over heterogeneous protocols by translating SQL*Net messages from one protocol to another. For example, a client workstation in a Token-Ring LAN can transparently access a server in a DECnet or TCP/IP network, insulating the application from the complexities of the underlying network infrastructure. In addition to providing multi-protocol communications, the MPI also provides cost-based message routing functions and uses alternate routes in the event that least-cost paths of a network are unavailable. Figure 2.4 illustrates the use of the MPI between clients and servers in SPX/IPX and TCP/IP networks.


Figure 2.4. Transparent database access over multiple network protocols with the Multi-Protocol Interchange.

  • Oracle Network Manager—The complex task of configuring and managing a distributed database network topology is made easier with the Network Manager, a GUI-based administrative interface for SQL*Net. The Network Manager is used not only to manage the Oracle Names dictionary but also to generate configuration files for client and server-side SQL*Net components and define connection routes for Multi-Protocol Interchange nodes.

Client/Server Development Tools

In addition to its server and networking products, Oracle includes a variety of client-side GUI offerings that complete its integrated client/server architecture. These product suites include full-featured Computer Assisted Software Engineering (CASE) tools, object-oriented development environments, and run-time components that are capable of operating with the Oracle7 server as well as other SQL databases.

  • Designer/2000—For developing sophisticated Oracle client/server applications, the Designer/2000 CASE environment provides a comprehensive repository and powerful tool set that enables you to systematically analyze, model, design, and generate both client and server components of an application. Designer/2000's repository is similar in most respects to its predecessor's, Oracle*CASE; however, its user interface and functionality are significantly enhanced, and it supports graphical business process reengineering as well as Oracle7 server and Developer/2000 features. As shown in Figure 2.5, the Designer/2000's repository stores analysis, design, and generation data.


Figure 2.5. The Repository Object Navigator of the Designer/2000 interface.

  • Designer/2000 is a complex tool with many features. Once you've mastered it, you'll find that the task of developing sophisticated applications from start to finish is faster and much more efficient than it is with traditional development methods. Information collected through its graphical diagrammers for data and application modeling is used to generate sophisticated, bug-free data definition language and application code. Designer/2000 generates full-featured, full-functioning applications for Developer/2000 tools, complete with menus, security, transaction control, and extensibility for OLE containers. Application generators are also in the works for Visual Basic and Power Objects.

  • Developer/2000—The Developer/2000 suite packages Oracle Forms, Oracle Reports, Oracle Graphics, and Oracle guide into a single integrated development environment. You can build your applications using just these tools or use them in conjunction with Designer/2000 to produce generated forms and reports.

    As with their character-based predecessors, SQL*Forms and SQL*ReportWriter, the Developer/2000 tools use PL/SQL as their underlying scripting language. Applications developed on one type of workstation platform can be deployed on other platforms such as Microsoft Windows, Macintosh, and Motif. Figure 2.6 illustrates a portion of the Oracle Forms Designer interface.


Figure 2.6. The Developer/2000 Forms Designer interface.

  • Power Objects—In addition to the Designer/2000 and Developer/2000 tools, the Oracle GUI product suite includes another object-oriented, GUI application environment that is designed to compete with the likes of PowerBuilder and Visual Basic. Power Objects provides a rapid application development environment with lots of drag-and-drop features plus automatic database transaction management. Instead of using the PL/SQL language used by Developer/2000, Power Objects uses a Basic-style scripting language that is similar in most respects to Microsoft Visual Basic and is well suited for small to mid-sized applications. The object-oriented nature of Power Object's design interface is illustrated in Figure 2.7.


Figure 2.7. Power Objects object-oriented application design interface.

Oracle Directions

Oracle Corporation continues to be a forward-thinking leader in the technology sector, introducing new technologies that provide extended functionality and better management, development capability, connectivity, and performance for scaleable client/server database systems. Some of the new technologies introduced as of this writing include the following:

  • Wireless client/server—Oracle has recently introduced connectivity and messaging technologies that support remote client/server computing. This technology, which operates over cellular data networks, is particularly useful for laptop and palmtop users. A slightly more advanced form of client/server computing, Oracle Mobile Agents uses a client-agent-server architecture that enables a client to work offline and connect periodically to the network to submit requests and receive results from the server. The agent component of this architecture functions on behalf of the client in its absence from the network.

  • Internet/World Wide Web interface—Oracle's Web Interface Kit is used to integrate World Wide Web servers to Oracle7 databases. The kit provides utilities to create Web pages and interface Oracle7 data to them, enabling both storage and retrieval of Oracle data by Web users.

  • Multimedia server—As applications use more different types of data, especially multimedia data, database server technologies will also improve to manage them. In future releases of the Oracle server, you'll see increased support for text and document data, audio and video data, and object-oriented data access. Oracle began work on its multimedia server several years ago and leads its competitors in the development of storage and retrieval technologies. This high-throughput, high-speed server technology delivers video on demand to consumers, using set-top, "smart TV" processors as clients.

Summary

This chapter provided an overview of client/server computing (as it applies to database systems) and discussed the role of Oracle products in client/server environments. Oracle has a well-designed approach throughout its product line to support applications running in global, enterprise-wide client/server systems. Although Oracle Corporation is most famous for its database server, it has many other sophisticated, mature front-end and network products that complement and extend the functionality of the server.

There are many features about the Oracle7 server that are well suited to client/server systems and provide a complete solution in its RDBMS server, products, and client development tools. As the scope and functionality of client/server systems evolve, Oracle continues to introduce products that support new infrastructure technologies and make the task of designing, developing, and implementing complex systems manageable and efficient.

Previous Page Main Page Next Page