Odapter is HP's new object/relational adapter which enables object-oriented developers to share a common object model stored in the ORACLE7 relational database management system (RDBMS). Odapter is also available with HP's ALLBASE/SQL RDBMS. The combination of Odapter and ALLBASE/SQL is called OpenODB.
Odapter Technical Data Object/Relational Adapter A Productivity Tool for Scalable Object-Oriented Applications Odapter is a tool for developers writing scalable object-oriented applications requiring the integration of new objects and legacy information. Odapter is valuable because it: * accelerates application development * reduces the cost of keeping applications current * enables applications to scale Odapter delivers the productivity of object technology while adhering to your data management standards. Consider Odapter if you need to be able to do one or more of the following: * develop object-oriented applications and store objects in a relational database * easily access legacy data and existing applications from your new system * support a large number of end-users who will be simultaneously accessing information * store large amounts of complex information The following are examples of applications well- suited for Odapter: * a customer billing application written in Smalltalk combining data stored in DB2 with new objects. (Telecommunications) * a network management application written in C using Odapter as the object manager, able to scale to millions of objects (Manufacturing) * a complex Oil and Gas industry standard model automatically generated from an Express analysis and design tool. (Oil & Gas) * a medical application using Odapter to combine heterogeneous components of patient records. (Healthcare) Odapter provides authorized access to sharable objects, including existing data and business processes. By bringing object-oriented capabilities to heterogeneous systems environments, Odapter delivers increased functionality while leveraging the stability of existing RDBMSs and legacy information. Odapter Object Model The Odapter object model is based on three key concepts - objects, types and functions. * Objects are a combination of data and behavior (functions). Figure 2 is an example of an object. * Types are dynamic templates allowing you to group together similar components or objects. * Functions define the attributes, relationships and behavior of objects. Odapter supports four types of user-defined functions: Stored functions define attributes and relationships that are stored in the database. In Figure 2, flightno is a stored function. The functions aircraft and crew are also stored functions with user-defined results. SQL-based functions allow you to access existing relational tables with Odapter's object-oriented model. In Figure 2, citypair is an SQL-based function accessing values from an existing relational table. OSQL-based functions define attributes and relationships that are derived or calculated with OSQL statements. In Figure 2, delay and depart are OSQL-based functions. Delay calculates changes in arrival and departure times based upon events that disrupt the schedule; depart handles the update of functions related to departure and transitions the flight from OnGround to InAir. External functions are a reference to code or data stored outside of Odapter. In Figure 2, cancel is an external function that executes code outside of Odapter to free up resources no longer assigned to the flight. Odapter Language The Odapter language can be combined with functions implemented in C++, Smalltalk or C. You create and manipulate objects, types and functions using Odapter's object-oriented structured query language (OSQL). OSQL is a functional language that is a semantic superset of SQL, the structured query language for relational databases. OSQL is a computationally complete language with statements allowing you to define and manipulate information in your Odapter enhanced relational database, specify authorization for individuals or groups, define transactions, embed program logic within functions, and administer the database. OSQL includes programming flow statements, such as IF/THEN/ELSE, FOR and WHILE. This procedural language allows Odapter functions to model complex behavior, simplifying your application code. By decoupling behavior from the applications, multiple applications can share information with benefits such as consistency, security and integrity. See Table 5 for a list of all OSQL statements. Odapter Object Storage Odapter objects are stored in the developer's choice of relational databases. Odapter interfaces to the underlying RDBMS through an SQL command interface. Currently, developers can choose to store their objects in ORACLE7 or HP ALLBASE/SQL. The choice of RDBMS is made when a particular database is created. The users are only limited by the number of Odapter concurrent user licenses purchased. This flexibility allows database administrators to continue using their existing administration procedures and keeps the group from having to choose yet another database management system. During the initial development of an application, developers can make rapid progress without knowledge of the underlying relational database. Optimization of the objects and how they are stored in the underlying relational database is best done during the deployment phase. Odapter Development Environments Odapter developers have a choice of development environments. Whether Smalltalk, C++ or more traditional C and C-linkable languages are used, Odapter enables object storage in a scalable and robust relational database. In fact, objects can be shared between different applications, allowing different projects to employ the best tools for the job! Odapter and Smalltalk Odapter provides Smalltalk developers with transparent access to information stored in the underlying relational database. Odapter's Smalltalk Class Builder utility automatically generates ParcPlace Smalltalk compatible classes and methods based upon an Odapter object model. The developer can select specific Odapter types and functions, resulting in a corresponding set of Smalltalk classes and methods. Once the Smalltalk schema is generated, the Smalltalk developer can transparently access the underlying relational database, as shown in Figure 3. printFlight |allFlightObjects| allFlightObject:=Flight allObjects. AllFlightObjects do: [:aFlight| Transcript show :aFlight flightno value; cr]. Figure 3 Figure 3 shows how to access the flight objects shown in Figure 2 through Smalltalk. This example retrieves all flight object identifiers and prints the flight# for each one of the flight objects. All Smalltalk classes and methods which result in the access of Odapter structures are italicized. Flight is a Smalltalk class that corresponds to the Odapter type Flight. The Smalltalk methods allObjects and flightno map to Odapter calls that access data from the relational database storage manager. Odapter and C++ For C++ developers, once the corresponding C++ model is created, Odapter provides the abilility to manage C++ objects stored in the underlying relational database, as shown in Figure 4. void printFlight() { int i; ODBType Flight ("Flight"); ODBBag allFlights=Flight.allObjects(); ODBFunc flightno("flighno"); for(i=0;i<allFlights.size();i++){ cout<<flightno(allFlights[i]); } } Figure 4 Figure 4 shows a C++ version of the Smalltalk example in Figure 3. That is, Figure 4 shows how to access all the flight objects shown in Figure 2 and prints the flight number associated with each flight object. The Odapter C++ library includes a set of classes (e.g. ODBType, ODBClass, ODBFunc, ODBBag) and corresponding member functions (e.g. allObjects). User-defined classes (Flight) and member functions (flightno) are also shown. In Figure 4, all Odapter calls are in italics. Odapter and C-linkable Languages For traditional developers using C, or any languages linkable with C, the object-oriented features are provided by Odapter. Odapter objects are manipulated by embedding OSQL statements in the C program, similar to the db.execosql call shown in Figure 4. In addition, the C interface requires the conversion of data types from Odapter to C. By embedding Odapter calls in a C program, the C language becomes object-oriented. Features and Benefits Accelerates Application Development Odapter accelerates application development by integrating with familiar development environments and by providing a robust object-oriented model. Odapter's choice of development environments includes those which support the Smalltalk, C++ and C languages. Odapter's robust object model enables the integration of legacy data and business processes in the context of one sharable business object model, shielding the developer from the data storage complexity. The following Odapter features accelerate application development: Automatic mapping of objects to relational databases The application developer is shielded from the task of converting complex object models to two dimensional relational tables. Smalltalk Class Builder Once an OSQL schema is created, whether using available analysis and design tools or manually, Odapter's Smalltalk Class Builder can generate corresponding Smalltalk classes and methods. The developer can select the relevent part of the Odapter schema to generate. As the Odapter object model changes, developers can also incrementally update the Smalltalk classes. Object Identity Each object manipulated by Odapter has a unique, system-provided handle called an object identifier (OID). OIDs eliminate the need for creating unique keys to identify stored information. Additionally, OIDs reduce duplication of information when several attributes would be needed to uniquely identify information in the database. OIDs are also a powerful way to tune data access and performance. Inheritance Odapter objects can use functions defined on parent types in the type hierarchy. For example, as shown in Figure 5, a subtype of Employee called Pilot could inherit functions from Employee like hire and name, while defining unique functions like hoursflown and status. Multiple Inheritance Functions defined on a type can be inherited by one or more subtypes. In Figure 5, functions accessible by the type ManagingPilot are inherited from its parents, namely all functions defined on Employee, Pilot and Manager. By inheriting rather than redefining functions, you can easily add functionality to your application. OSQL If you already know SQL, you can quickly be productive using Odapter's OSQL. Both query languages are set-based, that is they retrieve sets of information based upon queries. Thus, OSQL does not require users to navigate through the database chasing pointers or object references. Encapsulation Odapter protects end-user applications from changes to the internal definition of objects. Since Odapter only allows access to data through functions with well defined arguments and results, your applications are protected from changes to the function body and you have control over how information is used. Aggregate Types Aggregates are used to represent collections, such as crew members (maybe several pilots, flight attendants and a mechanic) for a particular flight, or the employees reporting to a particular manager. Aggregates are not required to have a predetermined size. Odapter manages the memory associated with aggregates, relieving your application of this work. User-defined Data Types You can construct user-defined data types in Odapter, such as a type called Flight, Employee or Aircraft, as shown in Figure 6. Functions defined on these types can manipulate data stored within the current object, within other related objects or outside of Odapter. User-defined types maximize flexibility and lead to more manageable, clearer code. Complex Objects With Odapter you can construct complex objects from simpler objects. For example, Figure 6 shows the relationships between the types Flight, Aircraft and Employee. Complex objects relieve applications from managing such relationships. Reduces the Cost of Keeping Applications Current Odapter supports a server-centric business model which means the business logic and associated data is sharable by multiple applications. By separating out business objects (data and processes), from the application development environment, your company's business can be modified without impacting the applications. These changes can be immediately leveraged by the calling applications without recompilation The following features make applications easier to keep current: External Functions Using external functions, you can access distributed data and code stored outside of the relational database used by Odapter for storage, regardless of location or data format. Examples of external data sources include IMS, DB2 as well as custom databases and flat files. Odapter acts as an integrator so your application can manipulate information as recognizable business objects. This not only allows transparent migration of data over time, it accelerates developer productivity by hiding the complexity of a diverse data storage environment. Overloaded Functions Multiple functions can have the same name with different implementations. An application calls a function (e.g. salary) and Odapter determines at run-time which code (salary for Manager or salary for Pilot) to execute, based upon the type of the object against which the function is invoked. The application is simplified since the conditional logic for determining which function to execute is now in Odapter. Dynamic Schema Modification Odapter object models can be modified while the database is running. Developers can add new functions and types, as well as change the implementation of functions. This capability is particularly valuable to applications with high availability requirements. Dynamic Typing You can change the type of an object without destroying and recreating the object. An object can also belong to more than one type. As shown in Figure 7, once a Flight leaves the ground, it would change state from being an OnGround to an InAir Flight. OnGround functions such as maintenancecrew and availableseats would no longer be needed. An InAir object would need certain functions like bestroute and delay to calculate the most time efficient route and to calculate a projected delay based current weather conditions. Dynamic Typing allows you to represent an object in Odapter which transforms itself over time and, therefore, changes capabilities and attributes. Late Binding Odapter supports functions that are resolved at runtime. Late binding allows you more flexibility in application development and gives you the full power of overloaded functions as described earlier. On the other hand, Odapter will precompile or do early binding to improve performance. However, when types and functions changes at runtime, impacting a particular function, late binding occurs and the application automatically takes advantage of the new implementation of the function when it is called. Referential Integrity Since Odapter manages the relationships between objects, it can manage referential integrity on your behalf. That is, if an object referenced by other objects is deleted, the system removes all dependencies. Your application code is simplified since Odapter is able to keep the logical business model intact automatically. Multimedia Odapter allows you to manage large, unformatted data in binary format and treat that data as an attribute of an object. For example, you may want to create a function called diagram to show the sections and seating for an Aircraft object. Multimedia information can include graphics, images and voice. You can also define functions in Odapter to manipulate this multimedia information. For example, you can create a function called showexits that adds information to the diagram. Thus, various applications can share these complex functions. Import Facility The Odapter Import facility allows developers to update existing Odapter functions with data from external files such as spreadsheets or other databases. This is an object-oriented version of the relational "bulk load" functionality. Enables Applications to Scale Odapter makes applications more scalable by storing objects in a choice of RDBMSs, like ORACLE7. As a result, applications can access large volumes of data, be used by a large numbers of users, and perform on-line backup. In addition, Odapter protects against unauthorized access from users in a distributed environment. Odapter, with the help of the underlying relational storage manager, ensures the integrity and security of your data while maximizing the availability of that data for end users. The following features enable applications to scale: Indexing Indexes are automatically generated when you create types and functions in Odapter. You can also define your own indexes using B-tree and hashing algorithms. Indexes make end user access to information faster. Clustering Related functions and objects which have the same value for a function can be stored close to each other. This ability to influence how objects are stored allows you to tune the performance of the database based on how the information will be accessed by applications. Transaction Management Odapter ensures the logical and physical integrity of your database by giving you complete control over the unit of work to be performed within a single transaction. With this control, you can save or rollback a transaction (throw away temporary work) at your discretion. Savepoints are also supported so that you can rollback parts of a transaction. Multi-user Concurrency Control Odapter is designed to support hundreds of users accessing the same information while guaranteeing the integrity of that information. Authorization You can control access to an Odapter enhanced database at the database and function levels based on individuals or groups of users. For example, authorization statements can provide read access to a large group of users while limiting write or delete access. High Availability Because Odapter actually stores objects in an RDBMS, Odapter can leverage RDBMS features to maximize the availability of your information by providing: * on-line backup of the database, to backup the database while it is being accessed * dual logging, to ensure the integrity of your log file * switch log, to automatically switch to a second log file if the original log file becomes full * dynamic file expansion, to expand the size of your database as it becomes full Odapter will also take advantage of other available features of the underlying relational database management system such as replication or "warm standby". Recovery Odapter uses the robust logging and recovery facilities of the RDBMS. In case of a failure, you can rollback work or perform rollforward recovery to a particular time, using the log file to recreate saved work. Odapter Software Components Odapter uses a client/server architecture, enabling you to efficiently utilize your computing power. Clients use the object application call interface (OACI) to communicate with the server over the network. The clients and server components can also reside on the same machine. Odapter is bundled with the following client and server components, as shown in Figure 8: Client Components * Interactive Object-Oriented SQL (IOSQL) This interface allows you to interactively enter all Object-oriented SQL (OSQL) statements, facilitating rapid prototyping and testing. IOSQL provides query, administration and editing capabilities. * Graphical Browser (GOSQL) The Graphical Browser is a tool that allows you to graphically explore your database schema and contents, and execute any OSQL statement. This tool is designed to assist application developers by making it easier to view and manipulate your object model stored in Odapter. * Windows OSQL (WINOSQL) This PC-based interactive interface to OSQL allows you to interactively enter all OSQL statements. * Object Application Call Interfaces (OACI) Odapter provides client interface libraries for the Smalltalk and C++ object-oriented programming languages, allowing these languages to be tightly coupled with Odapter. You can also write Odapter applications using any programming language that can be linked with C (such as Ada, COBOL, FORTRAN and Pascal). The programmatic interface is similar to a "Dynamic SQL" interface, and passes strings representing OSQL statements to the Odapter server. No preprocessors are required. Server Components * Odapter Object Manager The Object Manager executes OSQL calls made by the Odapter clients. The Object Manager processes requests, and accesses data and code stored in the Odapter enhanced relational data storage manager or passes the request to a subsystem outside of Odapter using Odapter External Functions. * External Functions External functions allow you to access data and code stored outside of Odapter, regardless of data format or location. External functions can automatically link to specific data sources using the Odapter EDA-Objects class library and the EDA/SQL product from Information Builder's, Inc. (IBI). External functions can also be implemented by you as subroutines written in general-purpose programming languages and compiled outside of Odapter. External functions can be called by any OSQL statement, allowing you to manipulate this remote data and application code like any other Odapter object. For example, Figure 9 shows how Odapter integrates diverse heterogeneous information in an Oil and Gas environment. * EDA-Objects HP and IBI have jointly developed an external function library called EDA-Objects. Coupled with IBI's EDA/SQL product, EDA-Objects provides connections to over 50 commonly used databases on 35 different platforms. The external function library to connect to EDA/SQL is shipped with Odapter; however, you must purchase other EDA/SQL components from IBI directly to use the product. EDA-Objects is one way to integrate external data from multiple servers into a single business model managed by Odapter. This is done without physically moving the data or changing the applications which are dependent on the data in its current form. Additional Products * Development Environments and Tools Odapter allows you to use your favorite development environments for application development. Some tools are more tightly coupled with Odapter than others. HP has recruited tools partners to address all aspects of application development including application design and analysis, data model manipulation, fourth generation language application development, report writing and legacy data access. * Relational Database Odapter uses a relational database as its storage manager for the storage of Odapter objects. The relational database performs physical file management and database functions such as multi- user concurrency, transaction management, and recovery. The relational database allows you to perform on-line backup and recovery, manage physical distribution of files, maximize availability and change database parameters. * COMPASS COMPASS is a consulting product which includes the Hewlett-Packard implementation of the Petrotechnical Open Software Corporation (POSC) Software Integration Platform (SIP) specification. The SIP specification defines a data model and an interface which allow users and applications to access exploration and production data, independent of the database engine technology. The COMPASS package is an add-on to Odapter and includes: * COMPASS specific consulting/training (1 day) * POSC-based DAE interface library and documentation * Interactive user interface called ixpres * Archived copy of a pre-loaded Odapter enhanced database with sample reference data * Scripts for building a POSC-based Odapter enhanced database * Contributed software library (data loaders, demonstration programs) COMPASS gives developers a 'jump start' on building applications focused on petroleum exploration and production. Other industries will find COMPASS an inexpensive and useful approach for building geographic information systems (GIS) and other applications which can re-use of the cartography (mapmaking) and geometric objects defined in the model. POSC is a not-for profit organization created to lower the costs associated with accessing and integrating exploration and production data for the oil and gas industry. System Environment Hardware Operating Memory Disk Space platform System (minimum) (minimum)* HP 9000 S700 HP-UX 8.07 32MB 10MB + S800 or later necessary swap space Sun Solaris 1.0 32MB 10MB + (SunOS 4.3); necessary Solaris 2.0 swap space (SunOS 5.2) IBM RS/6000 AIX 3.2.5 32MB 10MB + necessary swap space X Terminal 6MB none IBM PC DOS 5.0, 4MB 1MB compatible MS-Windows 3.1 or later Table 1: Odapter Client Environments * Swap space needed will depend on the complexity of the application and the number of concurrent users. Swap space will significantly increase the necessary disc space. Hardware Operating Memory Disk Space platform System (minimum) (minimum)* HP 9000 S700 HP-UX 9.0 64MB 15MB + S800 or later necessary swap space Table 2: Odapter Server Environment * Additional memory may be required. Swap space will significantly increase the necessary disc space. The amount of memory and swap space depends on the complexity of the application and the number of concurrent users. Odapter Software Requirements To use Odapter, you will need one of the RDBMSs listed below, TCP/IP transport and ARPA Berkeley Services (for Unix systems), HP LAN Manager or Microsoft LAN Manager (for the PC client) software. To use the Odapter Graphical Browser, you will need X11 X-Window support. Table 3: Relational Databases Version Memory Disk Space (minimum) (minimum) ORACLE7 7.0.13 or later refer to refer to with "procedural Oracle Oracle option" (PL/ manuals manuals SQL), Pro*C, SQL*Plus & Oracle common libraries and utilities ALLBASE/SQL shipped with 64MB A/SQL 10MB OpenODB and Odapter * ALLBASE/SQL is included with the Odapter software. The combination of Odapter and ALLBASE/SQL is known as OpenODB. Ordering Information Software, training, consulting and support can be purchased separately, as well as in bundles. Pricing for the stand-alone software is based on the number of user processes accessing a single database server at the same time. Any number of user licenses can be ordered. You must also order the Odapter Media & Manuals product when ordering the Developer's Bundle or the Concurrent User License. HP standard support options are available for all Odapter license and media products. The OpenODB and Odapter products are sold together. OpenODB is the combination of Odapter and ALLBASE/SQL. You are only limited by the number of concurrent licenses purchased for Odapter. Product Number and Product Description B3767BB Odapter/OpenODB Concurrent User License Software license only. Must order B3768BA to receive software and manuals. Must specify number of users. B3768BA Odapter/OpenODB Media and Manuals Must choose media option. Includes software and one set of manuals. Requires prior or concurrent purchase of software license. B2470BA Odapter/OpenODB Developer's Bundle Includes 8 user software license, 5 days of on- your-site consulting, one year of on-line support and 2 passes to the Odapter/OpenODB Training Class. Must order B3768BA to receive software and manuals. B3179A Odapter/OpenODB Evaluator's Bundle Includes a 40 user software license for 3 months, media, documentation, 3 months of on-line support, and 1 pass to the Odapter/OpenODB Training Class. B3184S Odapter/OpenODB Training Class (5 days) B3185A Odapter/OpenODB Reference Manuals Includes the Odapter/OpenODB Reference Manual and the Odapter/OpenODB System Functions Manual. B3186A Odapter/OpenODB Consulting Customized consulting in any of the following areas: COMPASS, object-oriented analysis and design, schema design and review, authorization/security design and review, performance tuning, advanced usage, Odapter/OpenODB application development planning and review and implementation of access to legacy data sources. To order these products, please contact your local HP sales representative or one of the offices on the back page of this document. Table 5. Odapter Features OBJECT-ORIENTED FEATURES Aggregates (BAG, LIST, SET, TUPLE) Complex Objects Dynamic Schema Modification Dynamic Typing Encapsulation External Functions Functions (Stored Code or Methods) Late Binding Multiple Inheritance Object Identity (OID) Overloaded Functions Type (Class) Hierarchy User-defined Data Types Versioning Primitives CLASS LIBRARIES C++ EDA-Objects Smalltalk Softbench CLIENT INTERFACES Graphical Browser (GOSQL) Import Interactive OSQL Object Application Call Interfaces (OACI): C++ SmallTalk C-linkable languages (Ada, COBOL, FORTRAN, Pascal) Smalltalk Class Builder Windows OSQL OSQL STATEMENTS Add/Remove Type To/From Object Add/Remove User Begin/Commit/Rollback Work Call Function Change Owner Change Password Connect/Disconnect Create/Delete Function Create/Delete Index Create/Delete Object Create/Delete Type Create/Delete User/Group Declare/Delete variables Grant/Revoke If/Then/Else, While, For Implement/Modify Function Open/Fetch/Close Cursor Raise Error Security On/Off Savepoint Select Store Update PRIMITIVE DATA TYPES Binary Boolean Character Date Datetime Decimal Floating Point Integer Interval Small Integer Time Sales Offices For more information, call you local sales office listed in your telephone directory or an HP regional office listed below for the location of your nearest sales office. United States: 1-800-637-7740, extension 8521 Canada: Hewlett-Packard Ltd. 6877 Goreway Drive Mississauga, Ontario L4V 1M8 (416) 678-9430 Japan: Yokogawa-Hewlett-Packard Ltd. 15-7, Nishi Shinjuku 4 Chome Shinjuku-ku Tokyo 160, Japan (03) 5371-1351 Latin America: Hewlett-Packard Latin American Region Headquarters 5200 Blue Lagoon Suite 950 Miami, FL 33126 (305) 267-4220 Australia New Zealand: Hewlett-Packard Australia Ltd. 31-41 Joseph Street Blackburn, Victoria 3130 Australia (A.C.N. 004 394 763) (03) 895 2805 Asia Pacific: Hewlett-Packard Asia Ltd. 22/F Bond Centre, West Tower 89 Queensway Central, Hong Kong (852) 848-7777 Europe/Africa/Middle East: Hewlett-Packard S.A. 150, Route du Nant-d'Avril CH-1217 Meyrin 2 Geneva, Switzerland (22) 780 81 11 Technical information in this document is subject to change without notice. All brand and product names appearing herewith are registered trademarks or trademarks of their respective holders. ` Copyright Hewlett-Packard Company 1994. All rights reserved. Reproduction , adaptation, or translation without prior written permission is prohibited except as allowed under the copyright law. Printed in USA 7/94 5963-2045E
For more information, please send a message to odapter@cup.hp.com with the subject of "index" or "help". If you would like to speak with someone in person, please leave a voice mail message at the Odapter Support, Training and Consulting number, (408) 447-5051 and someone will get back to you as soon as possible.
This document was translated by ms2html v1.8 on 04.06.96.