0% found this document useful (0 votes)
78 views21 pages

Storing and Using Objects in A Relational Database

This document discusses SMRC (shared memory-resident cache), an RDBMS extender that allows objects created in external type systems like C++ to be stored in a relational database alongside existing relational or heterogeneous data. Using SMRC, applications can store and retrieve objects via SQL and invoke methods on the objects without modifying the original object definitions. The stored objects fully participate in the characteristic features of the underlying relational database, such as transactions, backup, and authorization.

Uploaded by

Kumar Sagar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
78 views21 pages

Storing and Using Objects in A Relational Database

This document discusses SMRC (shared memory-resident cache), an RDBMS extender that allows objects created in external type systems like C++ to be stored in a relational database alongside existing relational or heterogeneous data. Using SMRC, applications can store and retrieve objects via SQL and invoke methods on the objects without modifying the original object definitions. The stored objects fully participate in the characteristic features of the underlying relational database, such as transactions, backup, and authorization.

Uploaded by

Kumar Sagar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/224102058

Storing and using objects in a relational database

Article  in  Ibm Systems Journal · February 1996


DOI: 10.1147/sj.352.0172 · Source: IEEE Xplore

CITATIONS READS

10 1,998

4 authors, including:

Berthold Reinwald Hamid Pirahesh


IBM IBM
108 PUBLICATIONS   2,681 CITATIONS    137 PUBLICATIONS   9,861 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Miscellanea View project

IBM Db2 Event Store View project

All content following this page was uploaded by Berthold Reinwald on 24 November 2015.

The user has requested enhancement of the downloaded file.


Storing and using
objects in a relational
database
by B. Reinwald
T. J. Lehman
H. Pirahesh
V. Gottemukkala

In today's heterogeneous development ect often starts with established 00 tools, class li-
environments, application programmers have the braries, and object frameworks,' followed by a cus-
responsibility to segment their application data tomization step, and then is enhanced and refined
and to store those data in different types of
stores. That means relational data will be stored by using features such as inheritance and encapsu-
in RDBMSs (relational database management lation. This new programming paradigm has signif-
systems), C++ objects in OODBMSs (object- icantly improved both the programmer's produc-
oriented database management systems),SOM tivity and the timeliness and cost of application
(System Object Model) objects in OMG (Object
Management Group)persistent stores, and development. It is the growing interest in 00 appli-
OpenDocTM or OLFM(Object Linking and cations, coupled with the attractive features of re-
Embedding) compound documents in document lational database management systems (RDBMSS),
files. In addition, application programmers must that led to theadvent of extended RDBMSs, e.g., sys-
deal with multiple sewer systems with different tems like Postgres and Starburst, as well as object-
query languagesas well as large amounts of
heterogeneous data. This paper describes SMRC oriented database management systems (OODBMSS),
(shared memory-resident cache), an RDBMS e.g., systemslikeObjectStore**, 02**,Gemstone**,
extender that provides the ability to store objects and Versant" *.2-4 Since these systems were estab-
+
created in external type systems like C+ or lished, OODBMSs have matured significantly, creat-
SOM in a relational database, coresident with ing a market presence and increased market share.
existing relational or other heterogeneous data.
Using SMRC, applications can store and retrieve At the same time, RDBMS vendors saw some of the
objects via SQL (structured query language), and same 00 trends and subsequentlydeveloped object-
invoke methods on the objects, without requiring relational database management systems (ORDBMS),
any modifications to the original object e.g., systems like
UniSQL**, Illustra**, and D B ~ * . ~ "
definitions. Furthermore, the stored objects fully
participate in all the characteristic features of RDBMSS continue to dominate the database market,
the underlying relational database, e.g., and market analysts expectthat this trend will con-
transactions, backup, and authorization. SMRC is tinue.
implemented on top of ISM% DB2@Common
Sewer for A l p relational database system and Many users of RDBMSs are expanding towardappli-
heavily exploits the OB2 user-defined types
(UDTs), user-defined functions (UDFs), and large cations that require more effective handling of non-
objects (LOBS)technology. In this paper, the traditional data, such as text, voice, image, and fi-
+
C+ type system is used as a sample external nancial data. It is no surprise then, that most users
type system to exemplify the SMRC approach,
Le., storing C+ + objects in relational databases. Wopyright 1996 by International Business Machines Corpora-
Similar efforts are required for SOM or OLE tion. Copying in printed form for private use is permitted with-
objects.
out payment of royalty provided that (1) each reproduction is done
without alteration and (2) the Journal reference and IBM copy-
right notice are included on the first page. The title and abstract,
but noother portions, of this papermay be copied or distributed
I n recent years, object-oriented (00)technology
has achieved wideacceptance, maturity, and mar-
ket presence. An 00 application development proj-
royalty free without further permission by computer-based and
other information-service systems. Permission to republish any
other portion of this paper must be obtained from the Editor.

172 REINWALD ET AL. 0018-8670/96/$5.00 D 1996 IBM IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996
also desire their 00 data to be stored in their da- an efficient binding to bridge the gap between ob-
tabases without compromising the essential indus- jects of external type systems and RDBMSS in an at-
trial-strength features of RDBMSS that they already tractive and inexpensive way. By external type sys-
rely upon. Such features include robustness, high per- tem, we refer to types defined in C+ + , which are
1 formance, standards compliance, and support for different from the tables and fields defined in SQL.
open systems, security, bulk 1i0capabilities, anddif- Using SMRC,C + + objects are stored in the data-
ferent levels of concurrency and isolation. As a re- base in the samebinary format as they were created
sult, there is constant pressure on RDBMS vendors in the C+ + client application language. Thus, no
to provide additional functionality for storingobjects translation of C+ + class definitions to relational
that were created in the external type system of an schemata and no data conversion needs to be per-
00 programming language. This functionality goes formed. Standard SQL is used to store and retrieve
beyond user-defined types (UDTS),user-defined func- the C++ objects in the relational database. When
tions (UDFs), and large objects(LOBS)in SQL3.' UDTs retrieving an object from the database client
to mem-
extend the relational type system with new data types, ory, SMRC performs pointerswizzling (due to the re-
based on the relational built-in data types. The uDF location of the object in the client memory). Swiz-
mechanism provides a way to add functions to the zling isthe conversion of persistent database pointers
existing base of relational built-in functions. LOBSgive intomainmemoryaddresspointers.Whereas
the RDBMS a way to manipulate large dataobjects, schema mapper products are useful to provide an
1 typicallymultimedia
for applications.
Although the object-oriented view ofexistingrelational data,SMRC
addition ofUDTs,UDFs, and LOBS to an RDBMS in- provides persistence for new 00 data that need to
creases its functionality, these new features do not be storedin relational databases.In this sense,SMRC
match the functionality of classes, methods, and ob- is complementary to schema mapper products like
jects in an 00 programming language like C + + . Persistence**(seethesectionontraditionalap-
proach and related work) that require substantial
This paper describes the shared memory-resident data transformation between the relational repre-
cache (SMRC)prototype implementation, at the IBM sentation and C + + objects.
Almaden Research Center, that stores C+ + objects
in an RDBMS (e.g., D B Common
~ Server for AIX*) An alternative to using SMRC for making C+ + ob-
by exploiting the UDT, UDF, and LOB technology."."' jects persistent might be to use one of the above-
The design and implementation of SMRC" was es- mentioned OODBMSS. OODBMSS provide many fea-
pecially driven by the following requirements and turesthatare not available in mostrelational
goals: databases, such as arich object-oriented C+ + data
1 model, less impedance mismatch, fast navigational
The approach must be compatible with existing access, etc. However, OODBMSs offer these features
class libraries; thus there is no opportunity to in- at thecost of introducing their own server environ-
herit persistence properties from a commonroot ment in addition to an existing RDBMS environment,
object and modify class definitions to include ad- and thus burden the user with managing multiple
ditional constructors or add methods to support database servers. In fact, SMRC does not compete
persistence properties. directly with OODBMSS. OODBMSS target different
The objects must beaccessible in SQL (structured market segments andwork best for those users who
query language) queriesas theexisting relational have mostly 00 applications and need only persis-
data. tence and simple queryfacilities for their 00 data.
The methods of acquired class libraries must be OODBMSs offer smaller, faster servers for 00 data,
usable within SQL queries. and can handle varying granularities of data with
The performance of queries involving objects must ease. In contrast, SMRC supports a tight C+ + Ian-
1 be reasonable.This is particularly an areaof con- guage bindingas well as clustering and pointerswiz-
cern where methods, used within query predicates, zling for fast pointerbrowsing, seemingly as part of
are applied to millions of database records. If the the existing RDBMS that users already depend on.
predicate evaluatoris inefficient in invoking meth- SMRC is designed to allow users of an RDBMS to in-
ods of objects, then wheninvoked millions of times corporate 00 data into their existing relational ta-
on objects, the response time will be unacceptable. bles and applications. Using SMRC is similar to us-
ing an OODBMS,but SMRC uses a two-level store
SMRC (mostly) I 2 achieves the above goals by exploit- model rather than the traditionalsingle-level store
ing advanced features of RDBMSS and by providing Of most OODBMSs.

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 173


b
In this paper,we describe the design and implemen- map classes to tables are typically designed to pro-
tation of SMRC. We first elaborate on the problems mote 00 views of legacy relational data. The data
of storing C + + objects in relational databases, point originate in the relational database, and these prod-
out the shortcomings of related approaches, and ucts offer an 00 view of the data.They are not con-
briefly introduce the SMRC approach. Next we de- cerned with destroying the structureof an object by
scribe the SMRC concepts and the application pro- mapping it into a table because they are instead cre-
gramming interfaces. Then we discuss various im- ating objects from tables.In contrast, SMRC concen-
plementation issues and present some performance trates on new 00 data that were created in an 00
numbers. Finally, we provide a summary andgive a application and then are stored in an RDBMS.
brief outlook on future work.
Other kinds of products provide portable C+ + class
Class definitions and relational schemata library interfaces to relational databases. For in-
stance, the class library from RogueWave Software”
Many different approaches are proposed to mapclass contains classes like column, row, cursor, table, etc.,
definitions into a relational schema.In this section, to communicate with an RDBMS. These class librar-
we first show why these approaches are inadequate, ies are mostly useful for an object-oriented access
and thenwe present the approach pursued by SMRC. to existing relational data in databases (again, where
the data originate in the RDBMS),but are not atall
Traditional approach and related work. Data to be able to deal with the previously raised issues. They
stored in a relational databasesystem must first be offer method application programming interfaces
normalized, following the well-known relational nor- (APIS)for theirown generic storage libraries and, for
malization rules. l3 Normalization typically results in portability reasons,link in appropriate SQL run-time
a corresponding table per object type, with a cor- libraries provided by the R D E ” vendors. Marketac-
responding column perdata member.l4 Most exist- ceptance as well as performance are critical issues
ing database applications are designed in this way. for these approaches.
However, this approach poses some problems when
applied to class definitions that involve additional Persistence frameworks like PSOM (SOM [System Ob-
language concepts like encapsulation, inheritance, ject Model] persistent framework), I u 9 OMG (Object
and substitutability.Nevertheless,someschema- Management Group)Persistence Service,*(’and Tali-
mapper products available in the marketplace sup- gent frameworks provide an object-oriented infra-
port a (semi-)automatic mapping of class definitions structure to make objects persistent. Framework
to relational schemata,e.g., Persistence l5 and Subtle- classes can besubclassed by the userin order tocus-
ware**.16 In these products class definitions are tomize how and where objects should be stored. The
mapped to tables, exposing data members(even the application program must use the infrastructure and
private ones), and nesteddata structures are spread API of the framework to achieve persistence.
across tables. Class hierarchies are mapped either
in a collection of tables or a “super” table. In the For thefollowing varying reasons, allthe above-de-
first case, a root table contains all basic data mem- scribed approaches conflict with the SMRC goals
bers and,additionally, a discriminant columnto de- stated earlier in the introduction to this paper:
cide on the subtype of the objects. The tables forleaf
classes carry only the additional attributes.In thesu- Object natureis destroyed. The proposed mapping
per tablecase, the class hierarchy is completely flat- approaches destroy the object nature, as they flat-
tened into one super table. The recordsof this table ten the data membersof objects into columns of
contain null values in the columns of data members records. Each method application requires trans-
that are not applicable. In both approaches, the C+ + lating and even reassembling the object into the
main memory pointersare replaced by primary key original representation before methods can be ap-
and foreign key relationships, and system-specific plied on it. This approach degrades the perfor-
constructors, destructors, andaccess methods inher- mance of search queries in decision support sys-
ited from a persistent root class are included in the tems, which apply predicates to a potentially large
C + + class definitions. The access methods usually number (millions) of records and, thus, multiply
contain the hiddenSQL code to communicate with the cost of object reassembling.
the underlying database system and to destruct and Class libraries are useless. Database records are
store, and retrieve and construct the objects. To be not objects. Since the class methods are only ap-
fair, it is important to point out that products that plicable on objects, the acquired class libraries arc

174 REINWALD ET AL. IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


useless for the database system without object re- object methods are applicable on the client side in
creation. the application (as regular methods) as well as on
Encapsulation is broken. Problems also arise with the server side (as UDFsZ3).
the loss of C+ + semantics. Private data members
1 in class definitions should be accessible only via SQL. The structured query language, SQL, is a uni-
methods or “friends,”and therefore should not be versal basisfor data storage and itappears to be more
exposed in columns of relational tables. Although attractive for independent software development
one could hide private data members by restrict- than start-up query languages. SQL is already used
ing accessto base tables and allowing access only by existing database applications.
through views that omit the private data members,
this would be different from the original seman- Object containers.The fields of a relational table are
tics of private data members. used as containers to store objects. SMRC employs
Proprietary query languages and access methods two mapping schemes to store C+ + objects in con-
are used. The above(briefly introduced) ap- tainers: the abstract data type (ADT)mapping and
proaches use their own query languages and in- the binary large object (BLOB) m a ~ p i n g , ’depend-
~,~~
frastructures, making it difficultto develop porta- ing on how the containers are populated with ob-
ble database applications. jects. The ADT mapping stores a single object of a
class or class hierarchy in a container, whereas the
Some of the above problems may remain even if 00 BLOB mapping clusters many objects of different class
1
features are added to existing RDBMSs. For instance, definitions in a container.
systems such as Polyglot’’ and others22 introduce
their own type systems with their own notions of en- Pointer swizzling.As the objects are stored in native
capsulation, inheritance, and substitutability.By in- main memory format, pointers in the objects need
troducing their own type systems they remain incom- to be swizzled (converted to main memory address
patible with the external typesystem of an 00 pointers) by SMRC when the objects are retrieved
programming language and thus do not address the from the database and relocated in main memory.
problems that SMRC solves. SMRC type-tags the objects (associatesan object with
its data type) before storage, which allows it to lo-
The SMRC approach. The previous sectionoutlined cate the pointers within the objects upon retrieval.
certain language concepts and discussedshortcom- SMRC supports two types of pointers depending on
ings of existing approaches. The shortcomings exist the location of the target object of the pointer in the
mostly because the described approaches introduce database:
1 their own query language and try to map the type
system of the programming language to the RDBMS Internal pointer-The referenced object is stored
type system. In this section we give an overview of within the same container as the current object.
the SMRC approach and list the major concepts re- This model is used mostly in the BLOB mapping.
quired to implement the approach. External pointer-The referenced object is stored
in a different container from the current object.
Objectpresewing. In SMRC, objects are stored in the
database as they are created in the C+ + type sys- Internal pointers are implemented as normal C+ +
tem; therefore, the natureof the object is preserved. pointers, declared in the class definitions. External
No type transformation of the object representation pointers, which have additional semantics with re-
is required upon object retrieval, and class library gard to object faulting, require more structure than
methods can be applied almost immediately on the just C + + pointers and are treated separately. We
objects without a significant loss of performance, implemented two different approaches for external
b since
is
it not necessary to recreate the original ob- pointers, one of which is compatible with pre-exist-
ject representation. SMRC takes care of the C+ + lan- ing class libraries.
guage peculiarities in implementing encapsulation,
inheritance, and substitutability. Using SMRC, the da- The use of BLOB fields asgeneral-purposeobject con-
tabase system does not have to adopt the specific tainers is very powerful from an application devel-
C+ + semantics and can retain its languageindepen- oper’s point of view, asno data structure mappings
dence. Objects are stored via SQL in UDT columns are required; it is powerful as well from a database
of binary built-in database types; thus, the approach system point of view,as it does not have to deal with
does not introduce yet another query language. The the inner details of an external type system.UDFs can

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 175


1
be employed to interpret the contents of objects and bottom of the figure describes the relational tables
retrieve certain data members of objects only. The and themiddle part shows C+ + objects to be stored
synergy between SMRC, BLOBS,and UDFs provides the in the tables.
additional functionality for relational databases to
+
store C+ objects, coresident with existing rela- The ADT mapping appliesto applications where sin-
tional or other kinds of nontraditional data. How- gle C+ + objects may act as additional descriptive
ever, theBLOB container approach also has as a con-attributestodatabaseentities.Figure 1A shows
sequence, that certain database operations cannot a table orders with some typical columns like ordno
be performed directly. Indexes, join operations, or (ordernumber), prodno (productnumber),and
objects as part of primary keys are not possible, as quantity, and an additional columndelivery that con-
the BLOB type cannot be assigned or compared to tains the C+ + objects describingthe delivery of an
any other type. These arewell-known problems that order. The data type of the delivery column is a UDT
also exist in other areas of data management, e.g., called shipping, which wewill explain later. The C+ +
the storage of OLE* * objects in any kind of container, objects belong to the shipping class hierarchy con-
or text processing documents or spread sheetsin files. sisting of a superclass shipment for usual deliveries
In any case, only the original application is capable and a specialization class overseas in the case of cus-
of looking into the contentsof these containers or toms beinginvolved in the delivery. The class library
files. However, certain partsof the container thatare provides the required method implementations, e.g.,
accessed frequently or need to be indexed, can al- a method time() evaluates the itinerary of a delivery
ways be stored separately in addition to thecontainer. and estimates thedelivery time. The dashedlines in
Technology like Notes/FX** (Field exchange) is Figure 1A sketch the mapping of single objects of
available to automatically synchronizethe values in the class hierarchy in the delivery column of the or-
the container and the separately stored values.26 ders table.
Notes/FX uses OLE embedded objects to provide bi-
directional data exchange betweenfields in a Notes One goal of storing the C+ + objects alongwith the
document and objects created by FX-enabled OLE relational datais to perform queries that make use
server programs. of both the relational and the object-oriented data
in the database. Forthis purpose, thetime() method
of the C+ + class library is registered as a UDF in
SMRC concept and APls
the database system and, thereafter, it can be used
In this section,we first sketch variousSMRC sample in SQL queries like the example that follows. Note
applications and give a first impression on how to that the correct virtual function must be invoked for
use SMRC in combination with an RDBMS. Then, we each select-itemof column delivery according to the
describe the prerequisites to make objects persist- C + + type of the delivery argument, which may
ent, elaborate on the application programming in- change from record to record, due to subclassing.
terfaces (APIs) for the ADT and BLOB mapping, and (Although itis not shown in the sampleapplication,
show some examples of using external pointers. SMRC supports multiple inheritance.)

Developing applications in a SMRURDBMS envi- select ordno, prodno


ronment. One important featureof a relational da- from orders
tabase system is that users can extendthe database where time(de1ivery) > 5 and quantity = 1.0;
by adding columns to existing (and populated) ta-
bles. In the case ofSMRC, the application exploits The BLOB mapping applies in applications where a
this feature by using the additional columns asdata heterogeneous set of interconnected C+ + objects
containers to store C+ + objects. Using the ADT constitutes an additional attributeof a database en-
mapping, one C+ + object of a class or class hier- tity. Typical BLOB mapping applications come from
archy exists only in one data container, whereas in the areasof project management, network manage-
the BLOB mapping, many objects of different class ment, workflow management,and complex geo-
definitions map into the same data container. The graphical information system (CIS) applications. Fig-
selection of one of the proposedmapping approaches ure 1B sketchesaprojectmanagementsample
depends on thespecifics of an application. Figure 1 application. It shows a table projects with columns
shows two samples forthe ADT and BLOB mapping, name and budget, and a BLOB column schedule to
explained in more detailin the next few paragraphs. store heaps (collectionsof memory) of C+ + objects
The topof the figure describesthe C+ + classes, the representing PERT charts of the projects. (PERT, or

176 REINWALD ET AL. IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


Figure 1 SMRC mappingsamples

(A) SHIPPING
MAPPING
ADT
SAMPLE PERT
(€3) MAPPING
BLOB
SAMPLE

typedef union address I...us; ... europe;); class activity ( CLASS


typedef enum service {priority, overnight); activity *next; DESCRIPTIONS
int time( );
class shipment {
private: timef date;
address itinerary[lO];
address "current;
service del-service; class sub-activity { class end-activity {
public: virtual int time ( ) activity 'next; int time( );
Ref<activity> sub; );
1; 1;
4
class overseas: shipment {
trade-commerce-auth tca;
virtual int time ( );
1;

INSTANCE OF overseas c>- - - - - - -- 7 SMRC HEAPS OF OBJECT INSTANCES

INSTANCE OF shipment 0- - -- -- 1
I
'1
1
1 1
::
I 1
I I
i ;
I I ""
-
""L

projects name budget schedule

pi
p2
p3
-
1M
2M
1.5M
+"' '
I

~. ~ ~

0UDT
IS A OF TYPE shipping 0IS A UDT OF PERT
TYPE

Project Evaluation andReview Technique, chartsil- retrieve the referenced object from the database.
lustrate critical paths forcompletion of project tasks.) SMRC is able tofault in the referenced object from
A class hierarchy includes a super class activity and the databaseautomatically when the external pointer
two subclasses for sub and end activities. The figure is dereferenced. (When an object is referenced, but
shows C+ + objects of three PERT charts allocated is not in main memory, afault condition occurs re-
in SMRC heaps, which are mapped into the schedule sulting in retrieving the object from the database.The
column of the projects table.The samplealso shows terminology used for this event is fault in. Derefer-
the usefulness of external pointers, asone of the ob- encing a pointer results in the value at the location
jects in the PERT chart for projectp2 refers toproj- that the pointer points to.) In the case of the ADT
ect pl as a subproject.The implementation of a "real" mapping, only the one referenced object is faulted
BLOB mapping application (and the related experi- in, whereas in the case of the BLOB mapping, the
ences) using SMRC is described in a paper referenced whole heap containing the referenced object is in-
earlier. *' stalled in main memory.

SMRC supports additional functionality for external The application program determineshow C+ + ob-
pointers (as opposedto internal pointers).An exter- jects should be mappedto database containers.The
nal pointer containsall the information requiredto application program createsobjects either in the pro-

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 177


gram default heap space (for the ADT mapping) or pointers, i.e., offsets of virtual function table (vtable)
in SMRC heaps (tocluster objects forthe BLOB map- and virtual base (vbase) pointers. To create a per-
ping). Object creation happenseither via the SMRC sistence schema, the SMRC schema compiler takes
overloaded new operator or the standard C+ + new as input an application schema source file that in-
operator. When the standard C+ + new operator is cludes the headerfiles containing the C+ + class def-
used with the BLOB mapping, an additional SMRC API initionsand SMRC flags that mark which classes
call is required to type-tag the created objects and should be made persistent. The schema compiler
eventually copy the objects into a SMRC heap. produces a named persistence schema is that
stored
in the schema database. A persistence schema is com-
In the ADT mapping, internal pointers are hidden piler-specific due to the compiler-specific allocation
pointers, introduced by the C+ + compiler to im- of the hidden pointers within the objects, but not ma-
plement inheritance and substitutability, aswell as chine-dependent, asthe persistence schema uses only
pointers referringto a data memberwithin the same symbolic information. 27,28 The currentSMRC imple-
object. In the BLOB mapping, additionally, internal mentation uses IBM’S C Set+ + * compiler. 29
pointers can refer to objects allocated within the
same SMRC heap. External pointers are supported The application schema source file that follows shows
for theADT and BLOB mapping, and theyhave to be the flagging of the shipping application in Figure 1A.
assigned by a special SMRC API call. The purpose of the file essentially is to include the
header files with the C+ + class definitions and se-
The decision whether to use ADT or BLOB mapping lectively flag those classes (within a dummy function
depends on the access patterns to theobjects used just for compilation purposes)that might have per-
by the application. The BLOB mapping offers two ma- sistent objects.Similar approaches to captureC+ +
jor advantages overthe ADT mapping. First,the ap- class information are pursued by OODBMSs. The use
plication programmer has the ability to cluster many of additional flagging macros in an application
objects of different class definitions in the samecon- schema source file provides a way for users to plug
tainer, in the event that they are logically related to in user-provided functions for unions,or repeating
each other and are often requested at the same time. functions for dynamic arrays. The overall schema
Second, many related objects can be retrieved by one compilation process is described in Reference 10.
database operation, as opposed to theADT mapping
that retrieves one object at a time.On the other hand, #include “smrc-macr0s.h”
retrieving one object at a timemight be moreuseful #include “shipping.h”
for applicationsthat requirea fine-grainedaccess to void dummy () {
data. SMRC-TYPE (shipment);
SMRC-TYPE (overseas);
With SMRC, C + + applicationsusestandard SQL
(query language)to storeobjects (orSMRC heaps of 1:
objects) in object containersof the database(i.e., ta-
ble fields). Objects are storedin binary format of the Application programming interface for ADT map-
C+ + type system without any data conversions. The ping. In this sectionwe describe the SMRC ADT map-
table columns for the object containersare defined ping API,and employ a more comprehensive version
as UDT types of some built-in binary datatypeof the of the previously introduced shipping application to
database system. demonstrate the use of the AH.

The SMRC persistence schema. A SMRC persistence SMRC tracks type and relocation information for
schema is a collection of application type descrip- pointer swizzling purposes. The type information
tions created by the SMRC schema compiler. The provides the pointer offsets to achieve addressabil-
schema essentially describes the layout of all of the ity of the pointer data membersin the objects. The
persistent C+ + objects for the application, which relocation information provides the basics to calcu-
is needed formemory management and pointer swiz- late the load differences of the objects required for
zling. The schema includes structural information(in pointer swizzling.Since the databasesystem does not
particular, size and pointer offset information) that know about C+ + class definitions (and C+ + does
contains the type information of embedded struc- not support run-time type information), SMRC at-
tures, unions, and dynamic arrays. In addition, the taches type tags to theobjects before they are stored
type information contains theoffsets of the hidden in the database system. After an object is retrieved

178 REINWALD ET AL. IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


from the database,all the internal pointers (the hid- fine the table:
den pointersin the AD’r mapping) within the objects
are swizzled before object usage. The external point- create distinct type shipping as varchar (830)
ers are swizzled transparently at dereference time. for bit data with comparisons;
1 create table orders (ordno int, prodno int, . . . ,
The following SMRC API calls provide the required delivery shipping);
functionality fortype information and pointerswiz-
zling: If orders is an already existing (populated) table,col-
umn delivery is simply added to it by modifying the
+
Type tag C + object: smrc-tag (objptr, type-name, table.
schema-name, hv).Before an object is stored, smrc-
tag() is called to copy the object referenced by objptr Register class methods asUDFs. Class methods to be
into the SQL host variable hv, deswizzle the (hid- used within SQL must be registered with the RDBMS.
den) pointers, andtype-tag the object copy. Type- As the class methods cannot directly be registered
name and persistence schema-name are used by as UDFs-they do notfollow the SUL UDF calling con-
SMRC to create a unique type tag. Thetag call is ventions-SMRC generates external UDF gateway
required fornewly created objects (createdby the functions for each class method to be used within
standard C + + new operator) as well as updated SQL statements. ‘The signature of a UDF gatewayfunc-
1 retrieved
objects, as SMRC performs deswizzling tion has the appropriate UDT as an input type and
of pointers in this call. After tagging an object, the the result typeof the class method as an outputtype.
object in the SOL host variable is stored in the da- The implementation of the UDF gateway function
tabase via an SQL insert or update statement. obeys the SOL UDF calling conventions. It first
swizzles the input, and then calls the original class
Swizzle pointers: swizzle (hvptr). Objects are re- method.
trieved from the database into an SQL host vari-
able hvptr via select statements. Theswizzle() call
create function time (shipping)
takes as an input a pointer to the retrieved (un-
returns integer
swizzled) object in the host variable, swizzles the
language c
object, and returnsa pointer to the swizzled C + +
external name ’Mreinwaldhdf-lib!time’;
object.

Get the type of an object:smrc-object-type (hvptr). Znsert objects into the database. Objects are created
When object instances of a class hierarchy are via the standardC+ + new operator andinserted into
stored in a column, itis useful to be able dynarn-
to the databasevia the standardSQL insert ~tatement.~”
ically identify the type of a particular objectin the In the sample smrc-tag call, “overseas” is the type
column. The smrc-object-type() call returns a char- name within the “shipping” application schema.An
acter string identifying the type of the object cur- object is created, tagged in an SQL host variable hv
rently retrieved into the SUL host variable hvptr. of an appropriate size and inserted into a table.

The following steps show the use of the ADT map- struct {unsigned short len; char data[830];} hv;
ping API for theshipping sample applicationin Fig- overseas *delptr = new overseas();
ure 1A. We start with the database description and
...
then insert and retrieve objects to and from the ta- smrc-tag (delptr,’overseas’,’shipping’,&hv);
ble. exec sql insert into
orders (ordno, prodno, quantity, delivery)
1 Create tableladd additionalcolumn. The objects of values (IO,20, 10, :hv);
the C+ + class hierarchy in Figure 1A are storedin
a table column delivery based on a distinct type. A Retrieve objects from the database. Objects are re-
distinct type essentially is a renamed built-in data- trieved using the standardSQL select statement. We
base type.X Thesize of the distinct type is the size do not impose any additional restrictions on such
of the largestclass in the class hierarchy (plus4 bytes statements. These statements can be dynamic, or
for the type tag). The following statements can be static for better performance, and can flow across
performed in dynamic SQL in order to determine the any supported API, such as DRDA,~’ODBC,” etc. They
830 varchar size (size of class overscas + 4) and de- can also be interactive or embedded in applications.

IBM SYSTEMS JOURNAL, VOL 35, NO 2,1996 REINWALD ET AL 179


I
The SMRC swizzle call may be used from within the Reference 10for details). Each SMRC heap has a root
client application after retrieving the C+ + object object (or, potentially multiple root objects) that
into an SQL host variable, or from within the UDF gives the application an entry point tothe network
gateway implementation. The following two exam- of objects within a heap. The entire heap of objects
ples demonstrate both cases: in the first example, a is stored in binary format in a relational table.
delivery object is retrieved into anSQL host variable
and swizzled on the client side. As the object can be Upon retrieval of a heap in main memory, all the
either of C+ + type shipment or overseas, proper type internal pointers within a heap areswizzled at one
casting needs to be done. The second example shows time (“heap-at-a-time’’ swizzle approach),after
the use of the time UDF gateway function; thus,the which, a user can navigate through the objects at
swizzle call is hidden in this UDF. The UDF runs on main memory speed by dereferencing the C + +
the server side. pointers. External pointersare swizzled lazilyat de-
reference time, when a heapcontaining a referenced
Case 1: Client side swizzling. object getsfaulted in by SMRC.Retrieving only a sub-
set of the objects in a heapis not supported, although
select ordno, delivery the user might have a uDF operating on the heap,
into :ordno, :del-obj which returns only a value, or a table functionwhich
from orders returns a set of tuples. Currently, table functions
are
where quantity > 10; currently not supported by DB2.
if (!strcmp(smrc-object-type(&del-obj),
“shipment”)) { The following API calls are listed in the orderof typ-
dp = (shipment *) swizzle(&del-obj); ical usage in an application:
} else {
dp = (overseas *) swizzle(&del-obj); Create heaps-A SMRC heap is created with an as-
1; sociated persistence schema. Objectsof class def-
initions within this schema can be allocated in the
Case 2: Server side swizzling. created heap. The size of a heapgrows dynamically.

select ordno, prodno, time(de1ivery) smrc-heap *hp = new smrc-heap(‘PERT’);


into :ordno, :prodno, :time-delivery
from orders Create and delete objects-Objects are allocated in
where quantity > 10; a heap via a SMRC overloaded new operator and
removed from the heap via a cancel method.
Application programming interface for BLOB map-
ping. The API for theBLOB mapping essentially con- /I create new object in heap
sists of the methods of the SMRC heap class. The obj = new (hp, ‘activity’) activity;
SMRC heap class provides the necessary methods to // remove existing object
both manage objects in memory heaps and swizzle hp+cancel (obj);
the pointers in the objects after retrieval fromdisk.
Given that theobjects within a SMRCheap arestored Root objects-Root objects provide entry points
and retrieved in one database operation, it is rea- to a heap.They can be set(set-root) and retrieved
sonable to consider aSMRC heap as the unit of per- (get-root) via heap methods.
sistence as well as the swizzle unit.
hp-set-root (objptr);
A SMRC heap is associated with a persistence schema objptr = (activity *) hp+get-root();
at heap creation time.Many different heaps with dif-
ferent schemata can exist in an application simul- Store heaps in database-SMRC heaps comprise
taneously. An application can allocate objects di- multiple memory segments to allow dynamic
rectly in the SMRC heap, via the SMRC overloaded growth. Thus, before aSMRC heap can be stored
new operator, orit canalternatively create C t + ob- as a value in the database, it must first be “packed”
jects in its own heap and then later call the SMRC into a contiguous memory segment. However, the
“deep object copy” routine, which copies acomplex SMRC heap management avoids this copy step if
network of referenced objects into aSMRC heap (see the heap is not segmented. As shown in the sam-

180 REINWALD ET AL. IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


Figure 2 External pointer sample application

C++ CLASS DEFINITION: class package [


class shipment ( public: ...
public: ... int weight }
Ref<package> pkg:}
RELATIONAL SCHEMA:

"""-"

APPLICATION PROGRAM:
shipment "sp;
exec sql select prodno, delivery into :pno, :ship-hv
from orders where ordno = 20;
sp = swizzle (&ship-hv);
printf ("Shipment of %iweighs %i", pno, sp->pkg->weight);

ple below, SMRC sets up theSQL host variable(hv) I/ Now the application canaccess objects in the heap
to store the heap into the database (the 500k size 11 via (pure) C++ pointer browsing.
in the declaration of the host variable is required
by the RDBMS for range checking). Working withexternal pointers and object caching.
SMRC supports external pointer^,^^,^^ which extend
I
sql type is blob(500k) *hv; the scope of pointers and referto objects stored in
hv = hp+pack(); 11 pack heap hp and setup hv other fields of the same column, other columns in
insert into projects (schedule) values (:*hv); the same table, and even columns in other tables.
Figure 2 shows an extension of the shipping ADT sam-
Retrieve heapsfiom database-SMRC heaps arere- ple application.Class shipment contains an external
pointer pkg to class package. The shipmentobjects
trieved from the database into an SQL host vari-
able. are stored in column delivery of table orders and
the package objects in column wrapping of table
posting. The sample application codefirst shows re-
sql type is blob(500k) hv;
trieving and swizzling ofa shipment object from the
select schedule into :hv
orders table. Froman applicationprogrammer's
from projects;
point of view, the external pointer pkg behaves ex-
actly like an internal pointer. But in a normalC+ +
I
Swizzle heaps-Aretrieved heap in a host variable application, the dereferencingof the pkg pointer in
(hv) is swizzled and assigned to a SMRC heap vari- the shipmentobject would cause a segmentation vi-
able. After this, all the SMRC heap methods can olation, asthe appropriate package object might not
be applied (e.g., get the entry point of the heap be resident in memory. However, asthe pkg pointer
with hp+get-root()). is declared as aSMRC external pointer, SMRC is able
to catch this violation, automatically query the da-
smrc-heap *hp; tabase forthe referenced package object, swizzle the
hp = swizzle (&hv); retrieved object, and install it in main memory so
objptr = (activity *) hp+get-root(); that the object can be referenced by C+ +.

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 181


The assignment of external pointers is different from Nevertheless, the application programmer must be
internal pointers, as additional information is re- aware of the object cache to exploit its additional
quired, such as the table and column in which an ap- functionality. The object cache offers the following
plication stored the referenced object. This infor- API (we introduce it without the syntax):
mation is provided in an assignment method. At as-
signment time, SMRC creates object identifications Flush cache-All of the objects in the object cache
(OIDS) and stores them as external pointers, which are written back into the database and removed
are used to fault in the referenced objects. from the cache. This operation is usefulat the end
of application execution.
SMRC supports two differentapproaches to “declare” Save cache-All of the objects in the object cache
external pointers, and the application programmer are written back to the database, but still exist in
can opt between the two choices as appropriate. the cache. This operation is useful for saving ob-
ject changes in the database while continuing the
Template-based approach-An external pointer is application.
declared within the C + + class definition via a Register objects in cache-In the event that an ob-
SMRC-provided Ref template. This approach is like ject is retrieved separately (manually) by the ap-
the ODMG-93 C+ + language binding.35 plication via SQL, it can later on be registered in
the object cache.
class shipment { Remove objectsfiom cache-Objects can be explic-
... itly removedfrom the object cache.One might use
Ref(package) pkg; this to avoid having modifications stored back to
the database during flushing or saving cache.
1;
Flagging-based approach-An external pointer is Implementation
flaggedvia a SMRC macro in the application schema In this section, some of the specifics of implement-
source file. ing SMRC are addressed. We start with an architec-
tural overview and brieflyintroduce the SMRC heap
void dummy () { manager. The main part of the section is concerned
with pointer swizzling inADT and BLOB mapping as
. I .

SMRC-Ref(shipment, pkg); well as implementing external pointers.


1;
Implementation overview. SMRC runs under the con-
In the template-based approach, SMRC uses an over- trol of an RDBMS server and uses the SQL query Ian-
loaded dereference operator thatchecks object res- guage. This makes it relatively easyto extend exist-
idency at dereference time and queries the database ing relational database applications to use SMRC for
in case of an object fault. The flagging-based ap- additional storage of C+ + objects and to have the
proach uses the ability of the paging hardwareto trap stored objects be part of an integrated clientherver
access violations order
in tocatch objectfaults at de- database solution. Additionally,SMRC benefits from
reference time. For the applicationprogrammer, the all the industrial-strength RDBMS features with re-
choice between the template-based or theflagging- gard to concurrency control, recovery, etc., of the
based approach depends on whether the class de,f- underlying database system.
initions can be modified to use the SMRC Ref tem-
plate and to have a portable application, or to not Figure 3 describes the environment one would use
modify the class definitionsbut depend on page pro- to develop an application with SMRC and an RDBMS,
tection in the hardware. and showsthe road map for this implementation sec-
tion. SMRC can run on the client side as well as on
Whether an object is faulted in via the overloaded the server side. Figure 3A shows the SQL AH used
dereference operator orvia page protection, SMRC by the C+ + application as well as the SMRC ApI. The
allocates the faulted in objects in an object cache. SMRC schema compiler(not shown inthe figure) pro-
From an application programmer’s point of view, vides the required type information for type-tagging
there is no distinctionwhether an object exists inthe and pointer swizzling. A SMRC heap manager pro-
application address space or the object cache, which vides the object clustering functionalityfor the BLOB
is part of the application address space. mapping. The cache managerfauZts in and allocates

182 REINWALD ET AL. IBM SYSTEMS JOURNAL, VOL 35, NO 2 , 1996


Figure 3 SMRC overview

(A) CLIENT SIDE (6) SERVER SIDE

11
rn
C++ APPLICATION
r=I==l SMRC API
HEAP MANAGER C++ APPLICATION
SWIZZLER
CACHEMANAGER

RDBMS
T
SQL API

SERVER

objects referenced via externalpointers. At the server table and object tables are persistent, along with the
side (Figure 3B), C + + objects canparticipate in SQL objects ina heap. They provide addressability of each
queries by registering the class methods as UDFS. object andpointerwithin the objects ina heap, which
Since the UDFs are executed on the server side, SMRC is required for pointer swizzling. Thus, a heap is
performs pointer swizzling before the methods are completely self-contained; itcan be shipped in
applied. clientherver environments and interpreted at each
destination.
SMRC heap manager. The SMRC heap manager is
the key component for the BLOB mapping. It sup- Pointer swizzling. When objects are retrieved from
ports the functionality of a full-fledged heap man- disk and reloaded into main memory, all main mem-
ager on the client side, including main memory man- ory pointers within the objects must be swizzled due
agement of all the objects that should be stored to object relocation. SMRC supports three different
within the same field of a relational table. A SMRC approaches for pointer swizzling-all threeap-
heap is segment-oriented and grows dynamically in proaches are implemented to support either the ADT
size. mapping, the BLOB mapping, or external pointers.

SMRC maintains two auxiliary data structures for the Deswizzlepointers-All the pointers within an ob-
management of the objects within a heap: a type ta- ject are deswizzled, i.e.,the current object address
ble and an object table for each type. The type table is subtracted from all the pointer addresses before
refers to the complete type descriptionin the schema an object is saved on disk, thereby making them
database and thus provides the heap manager with offsets to the beginning of the object. After object
the required object layout information. The type ta- retrieval, the pointers are swizzled by adding the
ble is built at heap creation time and is related to new object address to all the pointer addresses.
the persistence schema specified at heap creation Savepreviousobject load address-The previous ob-
time. The object table for each type isupdated dur- ject load address is saved on disk along with the
ing each object allocation or deletion in a heap. The object. After object retrieval from disk, the point-
object tables grow dynamically. The entries in the ers are swizzled bythe difference between the pre-
object tablerefer to the objects withinthe heap. Type vious and the new object load address.

IBM SYSTEMSJOURNAL,VOL 35, NO 2, 1996 REINWALD ET AL. 183


Object identifications(0IDs)”Main memory point- The previously described pointer swizzling ap-
ers are replaced by persistent OIDS, which are in- proaches are used for user-defined pointers. The
dependent of the currentlocation of a referenced swizzling of virtual function table (vtable) pointers
object in main memory.A referenced object can (the same approach is applied for function pointers)
always be identified with an OID, either in main is described in the next section. Reference 10 elab-
memory or on disk. orates on incorporation of user-provided functions
to swizzle unions and dynamic arrays.
For theADTmapping, wehave implemented the de- Hidden pointers. C + + compilers implement dy-
swizzle approach, as it is the more efficient way in namic dispatchingand s~bstitutability~~ via two types
terms of memory space (the old object load address of “hidden”pointers: vtable pointers and virtualbase
does not have to be saved along with the objects on offset pointers. Figure 4 shows the object layout of
disk). Deswizzling happens when an object is type- the shipping classhierarchy introduced in Figure 1A
tagged withthe SMRC type-tag call introduced in the and highlights the compiler-introduced vtable and
ADT mapping API. The type tag is used after object
virtual base offset pointers. The hidden pointers are
retrieval to swizzle the pointers according to the new introduced by the C+ + compiler for class defini-
object location, i.e., we add the address of the new tions that contain virtual functions or virtual base
object location to the offsets in the deswizzled ob- classes. Just like any normal pointer, these hidden
ject. For the ADT mapping, swizzling is performed pointers need to be swizzled when the object is re-
one object at a time. located in main memory. The location of the hid-
den pointers within an object depends on the spe-
For the BLOB mapping, we basically apply the sec- cific c++ compiler. At this point, the SMRC schema
ond approach. However, it is not necessary to save compiler is compiler-dependent (IBM’S C Set+ +),
the previous loadaddress for all the objects ina heap, as it relies on the C+ + compiler to specify the off-
as it is sufficientto save just the load address of the sets of the hidden pointers.
entire heap itself. The relative address of an object
to the load address of a heap remains the same, as Virtual base offset pointers refer withinan object and
a heap is relocated as a whole. Saving the previous can be swizzled using conventional methods. How-
load address of a heap is the more efficient swizzle ever, the vtable pointers (pointers to the table that
approach for the BLOB mapping than traversing and implements dynamic dispatching of virtual functions)
deswizzling allthe objects in a heap. This approach depend on theallocation of the currentinstance of
is similar to the memory-mapped segments in Ob- the vtable in an application and cannot be swizzled
jectStore,36of course without doing memory-map- on the basis of object relocation. The best solution
ping. In ObjectStore, the pointers in the pages of a would be to let the C + + run-time system swizzle
segment are swizzled on thebasis of the relocation the hidden pointers, since it knows exactly how to
of the segment. In the case of SMRC, a whole heap set these pointers. Unfortunately, C+ + sets the hid-
of objects is loaded by the application into main den pointers only whenan object is created with the
memory, and SMRC swizzlesthe internal pointers of new operator as part of the constructor execution
all the objects in a heapwith the heapload address and does not export a callable ‘‘swizzle’’function. A
as a reference point. The type table and object ta- thorough discussion of the whole hidden pointers is-
bles in a heap arescanned to gain addressability of sue can be found in Reference 37.
the objects, and the associated typeinformation pro-
vides the offset information of the pointers within SMRC swizzles the vtable pointers by allocating
the objects. Thus, the SMRC swizzler is able to di- dummy objects with a correct vtable pointer (one that
rectly address and swizzle allthe pointers in a heap was created in the current instance of the applica-
without any search or navigational overhead. tion) and “steals” the correct value of the vtable
pointer from this object. The SMRC schema compiler
For external pointers, SMRC performs pointer SWiZ- provides the location of the vtable pointer in an ob-
zling based on OIDS. If an object is referenced via an ject. This approach is similarto theObjectStore ap-
external pointer and the referenced object is not yet p r ~ a c that
h ~ ~maintains a hash table, mapping type
in main memory,the referenced object isfaulted in names into vtable addresses.
and the location of the object is usedas a main mem-
ory pointer (swizzled pointer). Details on swizzling The table is created during the ObjectStore internal
external pointers are described later. schema generation time at application startup time.

184 REINWALD ET AL IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


Figure 4 Main memory layout of C++ objects

SHIPMENT 0
4
f OVERSEAS
-
0
4
OVERSEAS -
8 ITINERARY[O] PART 8
48 12
I I
1 ... I __

SHIPMENT -
PART

Ontos’ approach (Vbase), making the vtables per- 2. Object faulting-When an object must befaulted
sistent as well, does not seem to be a p ~ r o p r i a t e . ~ ~ in, SMRC needs to be able toretrieve it from the
Aconstructorapproach is exploited by O+ + database.
(Ode),40 that introduces a “faked” new operator
(does not allocate memory). The new operator trig- SMRC launches an “under the cover” SQL state-
gers the executionof a constructor thatfixes all the ment to retrieve objects from the database:
hidden pointers. As no data members should ini- be
tialized with the constructor,all the defaultclass con- select (object-column)
structors of an application have to be rewritten in from (table)
order todistinguish whether they are used for pointer where (predicate)
fixing or usual object initialization. This approach is
not useful for SMRC, as it would require a recom- The SQL statement takes theOID as an input,which
pilation of parts of a class library, although thecon- is kept along with the external pointer causing the
structor rewriting can be triggered automaticallyby object fault. To provide all the input for the select-
a C + + precompiler. statement, an OID contains the following informa-
tion (20-byte structure):
Object cache and OIDs. The object cache, similar
to theSMRC heap (a superset,really), is part of the OID = {table-id, column-id, row-id}
application address space and can grow dynamically
in size. SMRC uses the object cache to manage au- Table-id and column-id are created outof the data-
tomatically faulted in objects via external pointers. base catalogs for the tables and columns in a data-
SMRC maintains an in-memory object table (hash ta- base.Databasecataloginformation is cached to
ble) with the object identifications (OIDS) of all the quickly translate the table-ids and column-ids in OIDs
loaded objects in an object cache. An OID uniquely to the corresponding table and column names for
identifies an object in the database and thuscan be the setupof the SQL statements. A row-id is similar
used for the following two purposes: to a system-generated primary key, but is not reus-
able. It uniquely identifies a record within a table
1.Object residency checks-Beforean object isfaulted and contains physical information to speed up da-
in automatically, SMRC must check whether ornot tabase a c c e s ~ .By
~ ’ having a row-id as part of the OID
the referencedobject is already loadedin the ob- in an external pointer, the faulting in of referenced
ject cache. objects can be very fast.

IBMSYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 185


Swizzling external pointers. SMRC swizzles external irrelevant residency checks are avoided and per-
pointers in a ‘‘lazy”fashion, depending on whether formance is improved. Additionally the RRLs can
the template-based approach or the flagging-based be usedfor garbage collection (reallocating unused
approach has been chosen to declare an external memory) in the object cache. Given their useful-
pointer. In the template-based approach, SMRC pur- ness, we feel that thetime and space overhead for
sues “swizzlingon d i ~ c o v e r y .Unswizzled
” ~ ~ ~ ~ ~ point- maintaining RRLs is justified.
ers in loaded objects are swizzled assoon as they are
discovered,i.e., during assignment or pointer deref- Comparingthe two external pointer approaches, the
erencing. For this purpose, the Ref template imple- page protection approach makes object faulting en-
ments overloaded assignment and dereference op- tirely transparent to thecompiled code, as opposed
erators.The approach avoidshavingunswizzled to the overloaded dereference operator that requires
pointers in local variables and unnecessary object source code modification to define external point-
loading. In theflagging-based approach withpagepro- ers. On the other hand, fielding a page protection
tection, SMRC supports “swizzling at dereference trap from the operating system is an expensive op-
time,” as onlypointer dereferencing can be trapped eration. Studies by Hosking and M O S S ~show
~ , ~ ’that
and not the assignment of an unswizzled pointer to software solutions can be more efficient. Detailed
a local variable. At object load time, SMRC swizzles performance comparisons and a discussion of the
an external pointer to a protected page and installs trade-offs between software dereferencingand mem-
a signal handler to catch the segmentation violation ory-mapped storage systems with page protection
at dereference time (page protection trap^).^^,^^ traps (E versus Quickstore) can be found in Ref-
erence 46. The “unduly large granularity of virtual
Similar pageprotection approachesare implemented memory pages”-as stated by Hosking and
in Obje~tStore,~’ Texas Persistent Store,45 and s a problem in SMRC, as the virtual
M o s s ~ ~ - ~not
Q ~ i c k S t o r eHowever
.~~ the SMRC implementation memory primitives are only used for page protec-
differs in twoimportant aspects from the above ap- tion traps and the protected pages can serve many
proaches: different external pointers.

OIDS of different objects can share protected pages Performance


for trapping purposes-When SMRC loads an ob-
ject with external pointers, it stores the object iden- We evaluated the performance of SMRC through ex-
tifier of the target objects for the external pointer periments that were implemented on an IBM RISC
on aprotected page (withother object identifiers). System/6000* with128 megabytes of main memory
On a protection trap, theSMRC handler knows the running AIX 3.2.5 and DB2 Version 2.1. Client ap-
object identifier on the protected page (based on plications and the database server run on the same
its location on the page) and is therefore able to machine. Here we present some of our experimen-
query the database (as previously explained). The tal results for the ADT and BLOB mapping.
retrieved object is not allocated on the protected
page, but in the object cache, which is not page ADT mapping performance. With regard to space
protected (see the next bullet on how to assign the efficiency, SMRC requires only 4-byte storage over-
address of the faulted-in object to thefault-caus- head for the type tag of each object-a type tag is
ing pointer). By putting many differentOID targets stored as part of an object. With regard to the per-
on a single protected page we avoid “the fan-out formance of storing the objects, the type tag oper-
problem,” where whole page frames would be al- ation requires a memory copy(the memcpy routine)
located for each external pointer in memory. of the object to get the data into the SQL host vari-
Reverse reference lists (RRLs)-SMRC uses RRLs to able, plus an address assignment operation for each
track all references to an object. An RRL is a list deswizzled vbasepointer. If an application uses the
of back pointers to objects (actually to pointers SMRC overloaded new operator, copying of the ob-
within objects) that reference the same object, i.e., ject is not necessary, as SMRC directly allocates the
the same object identifier allocated in a protected object along withthe required type tag. For the SQL
page. UsingRRLs, SMRC is able to (1) redirect the insert operation of the host variable, SMRC relies on
fault-causing pointer to theaddress of the faulted the performance of the applied database operation.
in object during protection trap handling, and (2)
avoid additional page faults caused by other ob- For object retrieval, there is the performance of the
jects that refer to thesame object. Consequently, select statement and the swizzle operation itself. The

186 REINWALD ET AL. IBM SYSTEMSJOURNAL, VOL 35, NO 2, 1996


swizzle operation costs an address assignment for Table 1 ADT mappingperformanceresults
each vbase pointer aswell as for each vtable pointer.
The SMRC internal persistence schema with theElapsed
class(scansQuery
Approach
layout description is built at startuptime. It is global 2OOO
Timetuples)
information that is used by all swizzle operations in SMRC ADT select prodno,
quantity 2.66 sec.
an application. mapping from orders
where time (delivery) = 0
We have not yet run any commercial relational or Class select prodno, quantity 2.89 sec.
de facto 00 benchmarks, as none are specifically “flattening” from orders where time
geared to measure the uniqueof set features in SMRC. ( . . . 3 2 parameters. . . ) = 0
Relational benchmarksdo not exploit the SMRC tech-
nology, and 00 benchmarks donot incorporate the
unique SMRC functionality of having coexistence be- Table 2 BLOB mapping performance results
tween relational and object-orienteddata. However,
to gain an understandingof our relative performance Type information type table
entries 230
to OODBMSs, we are preparing to run the 0 0 7 bench- pointer definitions 610
user-provided 22
mark.4y functions

In the meantime, we developed the following exper- Sample query heap size 85 kilobytes
number of objects 950
iment. We compared the SMRC ADT mapping ap- swizzled pointers 4300
proach (which maps an object to a single column) elapsed time 83 milliseconds
to an approach that completely “flattens” the C+ +
class definitions and stores all the data membersin
additional table columns.s‘)In bothcases, however, tables. However, this experiment compares the
SMRC
we required that the language objectavailable
be so approach against an unnormalized table, andSMRC
that it can be passed to theUDF (time) to compute was still faster.
the query predicate. In the SMRC case, the object can
simply be retrieved and passedto the time method. BLOB mapping performance. The BLOB mapping
In the flattened case, however, the object must be approach was applied in a nontrivial sample appli-
reassembled before it can be passed to the time cation. l o The persistence schema contained more
method (thiswork of reassembling the objectis done than 160 SMRC flagged class definitions with approx-
in the UDF before the method call).” imately 260 persistent pointer definitions and sev-
eral definitions for unions, dynamic arrays, and func-
We populated theorders table from Figure1A with tion pointers (see Table 2). The type table in a heap
2000 C + + objects and executed a querythat did a had more than230 type entries (it included the em-
table scan and invoked the time method onthe C+ + bedded types) with more than610 pointer definitions
objects. We made thequery result empty, to factor (including the transient pointers). Atypical heap size
out the clienthervercommunication costs and thus contained approximately 950 objects that allocated
focus on the overheadof running SMRC in the server. 85 kilobytes of object memory and contained 4300
swizzled pointers. Given the size of the application,
Table 1 shows the performance of the two queries. swizzling of the entire heapwas completed in a re-
In bothcases-the SMRC approach and the class flat- spectable 83 milliseconds of elapsed time.If wewere
tening approach-the sameoriginal C + + time to flatten this data rather than use the BLOB map-
method was executed as partof the UDF invocation. ping, the equivalent relational operation would in-
The experiment shows that SMRC is able topreserve volve multiple joins acrossmany tables to reassem-
the C+ + object nature; C+ + methods can be ap- ble the C + + objects. Actually, the worst case of
plied after objectretrieval from the database and ob- normalizing all the data types-which could result
ject relocationin main memory. SMRC also performs in 160 tables (and could require a 160-way join)-
slightly better (approximately 7 percent in the ex- would probably cause the databasesystem to run out
periment) in comparison to a class flattening ap- of memory.
proach.Beforeconductingthisexperiment, we
thought that theSMRC approach might be faster than In contrastto theADT mapping, which maps an ob-
a normalized approach,mostly because of the over- ject to a single container, the BLOB mapping maps
head in restoring the objects from the normalized a heapof (possibly) heterogeneous objects to sin- a

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 187


gle container. It is this primary difference (with
more Although our general design iscomplete, there are
detail provided below)that gives the BLOB mapping still some implementation details missing.A primary
better performance: issueis heterogeneous portability. Currently, the
SMRC schema compiler works only with the IBM AIX
No deswizzling-As the old heap load address is C Set+ + compiler. However, as the schema com-
kept in the heap header information, no deswiz- piler generates schema information as C+ + source
zling of the pointers within objects of a heapis re- code, the produced schema files then can be used
quired. Therefore, the storage operation of a heap on any platform. Furthermore, SMRC requires a ho-
is confined to just loading the entire heap of ob- mogeneous clienthewer platform for the object for-
jects into a column of a table. mat. Unfortunately, the problem of building a
Direct addressability forpointerswizzling-All ofthe general-purpose object translator (including the
pointers can be swizzled without search or navi-
translation of the method code) across multiple
gational overhead.The swizzle operation itself con-
platforms isextremelydifficult. Interestingly, the
sists of a single addition and assignmentoperation.
Obviously, if the heap is loaded in its original lo- solution may lie in a different language suchas
cation, then no pointers need to be modified (ex- Java**,28 a new object-oriented programming
cept the vtable pointers). language offered by Sun Microsystems, Inc. Java,
Cluster of objects-Since a heap represents a self- an interpreted language, is machine-independent
contained set of objects and references (external and can be used to create stand-alone applications
pointers are treated differently), the entire heap or program fragments. Java methods caneasily
can beadjusted in one swizzle call.No further I/O be moved across platforms to any machine that
or memory allocation operations wouldbe re- has a Java interpreter. We are exploring this
quired to additionally loador swizzle internally ref- possibility.
erenced objects.
A secondary issue isthe implementation of external
Summary and outlook references. One of our goals was to work with ex-
Unfortunately,our preferred so-
isting class libraries.
In this paper, we havedescribed anapproach to mak- lution (software swizzling using
smart pointers) is not
ing C+ + persistent using an RDBMS. Although many compatible with existing class libraries-the code
bridge technologiesbetween object-oriented and re-
must be recompiled to use the overloaded derefer-
lational systems haverecently appeared in research
ence (+) operator. Only the less preferred, platform-
publications and product lists, the SMRC approach
is stillunique, as itpursues a tight language binding dependent solution (the page-fault method) is truly
by storing objects in the same binary format in which compatible with existing classlibraries. We are still
they were created in the host language. As this bi- battling with this dilemma. Furthermore, we must
nary format is a “black box,” the database system can explore other kinds of external references, such as
only provide container functionality, i.e., storage uniform reference locators (URLS) and OLE refer-
management, and not use the datacontents directly ences.
in most relational operations, although we have dis-
cussed alternatives that use UDFs to expose parts of
the object. SMRC does not require a new object model Acknowledgments
or database language for persistence, but instead sim- Our thanks to Patrick Gainer, V. Srinivasan, andSte-
ply employs C + + and the industry standard SQL.
fan Dessloch for their help in preparing this paper.
This approach preserves the object-oriented lan-
Mike Carey gave us valuable comments to present
guage features of C+ + ,such asinheritance and sub-
stitutability,while adding persistence and object re- and relate our work to the state of the art.
location. Objects are stored via the ADT or BLOB *Trademark or registered trademark of International Business
mappings, asappropriate for the application, and can Machines Corporation.
be cross-referenced via external pointers. Our ap- **Trademark or registered trademark of CI Labs, Microsoft Cor-
proach is compatible with class libraries, as it does poration, Object Design, Inc., 02 Technology, Servio Corpora-
not require a modification of the class definitions to tion, Versant Object Technology, UniSQL, Inc., Illustra Infor-
inherit persistence properties from a common root mation Technologies, Inc., Persistence Software, Inc., Subtle
class. Thus, third party C+ + class library software Software, Inc., Lotus Development Corporation,or Sun Micro-
can be used on both client and server sides. systems, Inc.

188 REINWALD ET AL IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996


Cited references and notes 19. C. Lau, Object-OrientedProgramming UsingSOMand DSOM,
Van Nostrand Reinhold, Thomson Publishing Company, New
1. E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design York (1994).
Patterns: Elements of Reusable Object-Oriented Software, 20. R. Sessions, Object Persistence-Beyond Object-Oriented Da-
Addison-Wesley Publishing Co., Reading, MA (1995). tabases, Prentice Hall, Englewood Cliffs, NJ (1996).
2. R. Cattell, Object Data Management: Object-Orientedand Ex- 21. L. DeMichiel, D. Chamberlin, B. Lindsay, R. Agrawal, and
tended RelationalDatabase Systems, Addison-WesleyPublish- M. Arya, “Polyglot: Extensions to Relational Databases for
ing Co., Reading, MA (1991). Sharable Types and Functions in a Multi-Language Environ-
3. Communications of the ACM, R. Cattel, editor of special sec- ment,” Proceedings of the International Conference on Data
tion on next-generation database systems34, No. 10,30-120 Engineering (Vienna), IEEE Computer Society, New York
(October 1991). (1993), pp. 651-661.
4. A. Kemper and G. Moerkotte, Object-OrientedDatabaseMan- 22. H. Pirahesh and C. Mohan, Evolution of Relational DBMSs
agement: Applications in Engineering and Computer Science, Toward Object Support: A Practical Viewpoint,Research Re-
Prentice Hall, Englewood Cliffs, NJ (1994). port RJ8324, IBM Almaden Research Center, 650 Harry
5. W. Kim, “UniSQLIXUnified Relational and Object-Oriented Road, San Jose, CA 95120 (1991).
Database System,”Proceedings ofthe SIGMOD International 23. The class library with the method implementation has to be
Conference on Management of Data (Minneapolis), ACM compiled for the same platform, on the client and server side.
Press, New York (1994), p. 481. Otherwise, an object conversion (from the originating client
6. Illustra User’s Guide, Illustra Server, 2.1 edition, Illustra In- representation to the server representation) is required to
formation Technologies Inc., 111Broadway, 20th floor, Oak- incorporate different architectures.
land, CA 94607 (June 1994). 24. The name “BLOB mapping” has been chosen, as the fields
7. D. Chamberlin, Usingthe NewDB2: IBMs Object-Relational of the relational table are of database type BLOB. The BLOB
Database System, Morgan-Kaufmann, San Francisco, CA type is a special form of LOB. In DB2, it can contain up to
(1996). two gigabytes of binary data.2s
8. Database Language SQL3, J. Melton, Editor, American Na- 25. T. Lehman andP. Gainer, “DB2Lobs: The Teenage Years,”
tional StandardsInstitute (ANSI) DatabaseCommittee Proceedings of the 12th International Conference on Data En-
(X3H2), (August 1994). gineering (New Orleans), IEEE Computer Society,New York
9. R. Ananthanarayanan, V. Gottemukkala, W. Kafer, T. Leh- (1996), pp. 192-199.
man, and H. Pirahesh, “Using the Co-Existence Approach 26. Application Program Interface (API) User Guide Release 4.0,
to Achieve Combined Functionality of Object-Oriented and Lotus Development Corporation, 55 Cambridge Parkway,
Relational Systems,”Proceedingsof the SZGMOD International Cambridge, MA 02142 (1995).
Conference on Management ofData (Washington, DC), ACM 27. Object-level incompatibilityis created by competingcompiler
Press, New York (1993), pp. 109-118.
vendors, and could be solved by language-neutral develop-
10. B. Reinwald, S. Dessloch, M. Carey, T. Lehman, H. Pirahesh,
ment environments like SOM (System Object M ~ d e l ) . ’ ~ ~ ~ ~
and V. Srinivasan, “Making Real Data Persistent: Initial Ex-
SOM supports thebuilding and packaging of binary class li-
periences with SMRC,” Proceedings ofthe International Work-
shop on Persistent ObjectSystems, M. Atkinson, D. Maier, and braries so that object classes produced by one C + + com-
piler can be used from C+ + programs (or even other lan-
V. Benzaken, Editors, Tarascon, France, 1994, Workshops
in Computing, Springer-Verlag, Berlin (1995), pp. 202-216. guages) built with another compiler. An interpreted language
11. SMRC (shared memory-resident cache) is commonly pro- such as JavaZXmight also be able to solve the heterogeneity
nounced “smarc,” and should be on CompuServeTMunder problem.
the GO DB2 area. Contact the authors for more informa- 28. A. Van Hoff, S. Shaio, and 0.Starbuck, Hooked on Java, Ad-
tion. dison-Wesley PublishingCo., Reading, MA(December 1995).
12. We must honestly say that we “mostly” achieve these goals 29. C Set + + forAIXl6000, UserS Guide, SC09-1605, IBM Cor-
because although our general design does achieve them, our poration (1993); available through IBM branch offices.
prototype implementationonly comes close. However, parts 30. Typically,users store many columns with one SQL insert state-
of the SMRC implementation are already used in the DB2 ment, including the C + + object column. This is important
common server for storage and retrieval of C+ + objects used for performance. SQL even allows multiple record inserts,
in its sophisticated visual explain tool. We point out the dif- resulting in better performance due to more set-oriented pro-
ferences between the SMRC design and implementation at cessing.
the appropriate points in this paper. 31. M. Zimowski, “DRDA, IS0 RDA, XiOpen: A Comparison,’’
13. C. Date, A n Introduction to Database Systems, sixth edition, Database Programming & Design, 54-61 (June 1994).
Addison-Wesley Publishing Co., Reading, MA (1995). 32. R. Orfali, D. Harkey, and J. Edwards, Essential ClientiServer
14. M. Loomis, “Object and Relational Technologies,” Object Survival Guide, Van Nostrand Reinhold, Thomson Publish-
Magazine 35-43 (Jan. 1993). ing Company, New York (1994).
15. Persistence UserManual, 1.2edition, Persistence Software Inc., 33. In C+ +, a similar concept to external pointers is calledsmart
1650 S. Amphlett Blvd., Suite 100, San Mateo, CA 94402 pointers, because they behave more intelligently and perform
(1993). additional work compared to normal C + + pointers.34
16. Subtleware for C+ +lSQL: Product Concepts and Overview, 34. M. Ellis and B. Stroustrup, The Annotated C+ + Reference
Subtle Software Inc., 1 Albion Road, Billerica, MA 01821 Manual, Addison-Wesley Publishing Co., Reading, MA
(1994). (1990).
17. D. Linthicum, “Rethinking C+ +,” DBMS Magazine 8, No. 35. R. Cattell, The ObjectDatabase Standard: ODMG-93, Morgan-
5, 1-2 (1995). Kaufmann, San Francisco, CA (1994).
18. SOMobjects, User’s Guide, SC23-2680, IBM Corporation 36. S. White and D. Dewitt, “A Performance Study of Alterna-
(June 1993); available through IBM branch offices. tive Object Faulting and Pointer Swizzling Strategies,” Pro-

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 189


ceedings of the Conference on Very LargeData Bases (VLDB), 51. For fairness, we also plan to run thetest where the flattened
Vancouver, Canada (1992), pp. 419-431. object can use one or more attributes to answer the query
37. A. Biliris, S. Dar, andN. Gehani, “Making C+ + Objects Per- directly, without requiring the C+ + object to be reassem-
sistent: The Hidden Pointers,”Software-Practice and Expe- bled first.
rience 23, No. 12, 1285-1303 (1993).
38. C. Lamb, G. Landis, J. Orenstein, and D. Weinreb, “The Ob- Accepted for publication December 22, 1995.
jectStore Database System,”Communications of theACM 34,
NO. 10, 50-63 (1991).
Berthold ReinwaldIBM Research Division, Almaden Research
39. T. Andrews, The Vbase ObjectDatabase Environment, A. Car-
Center, 650 Hany Road, Sun Jose, California9.7220 (electronic mail:
denas and D. McLeod, Editors, Research Foundations in Ob-
reinwald@ almaden.ibm.com). Dr. Reinwald has been aresearch
ject-Oriented and Semantic Database Systems, Prentice-Hall,
associate at the IBM Almaden Research Centersince December
Inc., Englewood Cliffs, NJ (1990).
1995, joining IBM in July 1993 as a postdoctoralfellow. He de-
40. R. Agrawal, S. Dar, and N. Gehani, “The 0 + +Database signed and implemented a persistent object system on topof DB2
Programming Language: Implementation and Experience,” Common Server, and was involved in the development of IBM’s
Proceedings of the International Conference on Data Engineer- Visual ExplainTMtool as part of DB2 Common Server. Dr.
ing (Vienna), IEEE Computer Society,New York (1993), pp. Reinwald has significantly contributed to the area of workflow
61-70. management, and has been active in several areas of object-ori-
41. The row-id consists of a temporary and a permanent part. ented languages and systems. His recent research activities cover
The temporary part is used as a hint only. If the referenced several aspects of workflow and data management systems, in-
object is part of a table that is reorganized, the record may cluding transactions, distributed architectures, communication in-
get a new row-id. In this case, the permanent part of the frastructures, object-oriented extensions, and persistence. Dr.
row-id is used to find the record. The temporary and per- Reinwald received a Ph.D. in computer science from the Uni-
manent part of a row-id might be implemented as rids versity of Erlangen-Nurnberg in 1993 (best Ph.D. thesis award
(record ids) in relational databases. from the university). He is the author and coauthor of several
42. J. Moss, “Workingwith Persistent Objects: To Swizzle or Not conference and journal papers, and has published a book about
to Swizzle,” IEEE Transactions on Software Engineering 18, workflow management (in German).
NO. 8, 657-673 (1992).
43. Many operating systemsprovide primitives for memory map- Tobin J. LehmanIBMResearch Division, Almaden Research Cen-
ping, manipulation of page protection, andsetting up of sig- ter, 650 Harp Road, Sun Jose, California 95120 (electronic mail:
nal handlers to be invoked in the event of an access violation toby@almaden.ibm.com). Dr. Lehman joined the IBM Almaden
(e.g., mmap, mprotect, and~ i g a c t i o n ~In~ thisway,
). the abil- Research Centerin 1986,shortly after finishing his Ph.D. degree
ity of the paging hardware to trap access violations can be from the University of Wisconsin-Madison. His thesis introduced
exploited by systems like SMRC. a number of novel concepts for memory-resident database sys-
44. AIX General Programming Concepts, SC23-2205, IBM Cor- tems, such as the T-Tree index structure, dynamic lock granu-
poration (1993); available through IBM branch offices. larity, and partition-based loggingand recovery.At IBM Research,
45. P. R. Wilson and S. V. Kakkad, “Pointer Swizzling at Page he participated in a number of projects, including the R* Dis-
Fault Time: Efficientlyand Compatibly Supporting Huge Ad- tributed databaseproject, the ARBRE(a teradata-like database
dress Spaces on Standard Hardware,”Proceedings ofthe In- machine) project, the Almaden Computing Environment proj-
ternational Workshop on Object Orientation in Operating Sys- ect, the Starburst extensible database system project (designing
tems (Paris, France), IEEE Computer Society, New York and implementing both alarge object system and a memory-res-
(1992), pp. 364-377. identstorage system). Dr. Lehmancodirectedthe successful
46. S. White and D. DeWitt, “QuickStore: AHigh Performance SMRC (shared memory-resident cache) project and, with the
Mapped Object Store,”Proceedings of the SIGMOD Intema- SMRC project coming to an end, he is currently leading the ef-
tional Conference on Management of Data (Minneapolis), fort to take the lessons learned there and apply them to general-
ACM Press, New York (1994), pp. 395-406. purpose abstractdata type (ADT) supportin a relational DBMS.
47. A. Hosking and E.Moss, “Protection Traps and Alternatives
for Memory Management of an Object-OrientedLanguage,” Hamid PiraheshIBMResearch Division, Almaden Research Cen-
Proceedings of the 14th Symposium on Operating Systems ter, 650 Hany Road, San Jose, California 95120 (electronic mail:
Principles (Asheville, NC), ACM Press, New York (1993), pirahesh@almaden.ibm.com). Dr. Pirahesh has been a research
pp. 106-119. staff member at the IBM Almaden Research Center since 1985,
48. A. Hosking and E. Moss, “Object Fault Handling for Per- involved inresearch, design, and implementation of the Starburst
sistent Programming Languages:A Performance Evaluation,” extensible database system. Dr. Pirahesh has close cooperations
Proceedings ofthe International Conference on Object-Oriented with the IBM Database Technology Institute and IBM product
Programming Systems, Languages, and Applications (Wash- divisions. He also has direct responsibilities in the development
ington, DC), ACM Press, New York (1993), pp. 288-303. of IBM’s DB2 Common Server product. He has been active in
49. M. Carey, D. DeWitt, and J. Naughton, “The 0 0 7 Bench- several areas of database management systems, computer net-
mark,” Proceedings ofthe SIGMOD International Conference works, and object-orientedsystems, and has served on many pro-
on ManagementofData (Washington, DC), ACM Press, New gram committees of major computer conferences. His recent re-
York (1993), pp. 12-21. search activities cover various aspects of database management
50. It was awkward to program this case, as we had to expose systems, including extensions for object-oriented systems, com-
private data members. We could not keep inheritance and plex query optimization, deductive databases, concurrency con-
C+ + enumerated types, and we flattened out arrays and re- trol, and recovery. Dr. Pirahesh is an associate editor of ACM
placed pointers by indices. For performance, however, this Computing Surveys journal. He received M.S. and Ph.D. degrees
seemed to be the fastest approach to store the data in re- in computer science from the University of California at Los An-
lational tables. geles and a B.S. in electrical engineering.

1
190 REINWALD ET AL IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996
Vibby Gottemukkala IBMResearch Division, ThomasJ. Watson
Research Center,P.0.Box 704, YorktownHeights, NewYork 10598
(electronic mail:vibby@watson.ibm.com).Dr. Gottemukkala is a
research staff member in the Data Intensive Systems department
at the IBM Thomas J. Watson Research Center,where he is cur-
rently investigating issues in interfacing parallel applications and
databases, integrating database systemswith tertiary storage, and
designing databases for 64-bit architectures. His research inter-
ests also include storage architectures for parallel and distributed
databases, distributed sharedmemory and its application in da-
tabase systems, and database concurrency and coherence con-
trol. He received a Ph.D in computer science from the Georgia
Institute of Technology in 1995.

Reprint Order No. G321-5600.

IBM SYSTEMS JOURNAL, VOL 35, NO 2, 1996 REINWALD ET AL. 191

View publication stats

You might also like