page 1  (14 pages)
2to next section

P2: A Lightweight DBMS Generator1

Don Batory and Jeff Thomas

Department of Computer Sciences

The University of Texas at Austin

Austin, Texas 78712

{batory, jthomas}@cs.utexas.edu

Abstract

A lightweight database system (LWDB) is a high-performance, application-specific DBMS. It differs from a general-purpose (heavyweight) DBMS in that it omits one or more features and specializes the implementation of its features to maximize performance. Although heavyweight monolithic and extensible DBMSs might be able to emulate LWDB capabilities, they cannot match LWDB performance.

In this paper, we describe P2, a generator of lightweight DBMSs, and explain how it was used to reengineer a hand-coded, highly-tuned LWDB used in a production system compiler (LEAPS). We present results that show P2-generated LWDBs reduced the development time and code size of LEAPS by a factor of three and that the generated LWDBs executed substantially faster than versions built by hand or using an extensible heavyweight DBMS.

1 Introduction

General-purpose DBMSs are heavyweight; they are feature-laden systems that are designed to support the data management needs of a broad class of applications. Among the common features of heavyweight DBMSs are support for databases larger than main memory, client-server architectures, and checkpoints and recovery. A central theme in the history of DBMS development has been to add more features to enlarge the class of applications that can be addressed. As the number of supported features increased, there was sometimes a concomitant (and possibly substantial) reduction in performance. A hand-written application that does not use a DBMS might access data in main memory in tens of machine cycles; a comparable data access through a DBMS may take tens of thousands of machine cycles. It is well-known that there are many applications that, in principle, could use a database system, but are precluded from doing so by performance constraints (e.g., LEAPS [Mir90-91, Bra91-93]).

Extensible or open database systems ([Bat88, Car90, Haa90, Sto91-93, Wel92]) promoted DBMS customization by enabling individual features or groups of features to be added or removed. Unfortunately, extensible DBMSs were basically customizable heavyweight DBMSs; their architecture and implementations (e.g., layered designs, interpretive executions of queries) imposed the onerous overheads of heavyweight DBMSs. While extensibility can improve performance, it has been our experience that the gains are rarely sufficient to satisfy the requirements of performance-critical applications.

A lightweight database system (LWDB), in contrast, is an application-specific, high-performance DBMS that omits one or more features of a heavyweight DBMS and specializes the implementations of its fea-

1.This research was supported in part by Applied Research Laboratories at the University of Texas and Schlumberger.