Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers

ArticlesSmall Footprint, Will Travel


April 1998 / Javatalk / Small Footprint, Will Travel

Cloudscape's JBMS stores data and Java methods in a relational database that's under 2 MB.

Rick Grehan

Object-relational databases can store relational data as well as more complex data types, such as graphics files and other objects, but most need a server with at least 16 MB to run. Cloudscape's JBMS is an object-relational database system that implements a subset of the SQL-92 standard in less than 2 MB. It runs under Windows NT 3.5 or higher, Windows 95, or Sun Solaris. JBMS , which requires a JDK 1.1.1 or higher Java virtual machine (JVM), was scheduled to ship in February for $495.

It's important to recognize that JBMS is not a persistent storage database running atop a relational database engine (as is, for example Ardent Software's JRB, which I reviewed last month). It's a Java front end to a relational database back end. Consequently, where as in a persistent storage system you fetch and store objects directly, with JBMS you issue SQL-style SELECT and UPDATE statements.

This would seem to make JBMS no better than a thin layer atop Java Database Connectivity (JDBC). But it's more. For example, JBMS lets you store any serializable Java class in the database. This means that a database can hold not only data, but the classes -- and, therefore, methods -- that manipulate the data as well. Because the database holds data in addition to executable code, you don't have to compile the classes that manage stored objects into the application; those classes can be loaded at run time.

Cloudscape has extended the SQL to a variant that it calls SQL-J. This allows you to use a class's methods in SQL statements. Suppose, for example, that a database holds objects of class Hotel , and one of the Hotel methods is amenitiesIncludes() . The amenitiesIncludes() method takes a string as an argument and returns a Boolean value indicating whether the string is in the set of Hotel amenities. You could then issue the following SQL-J statement against the JBMS database:

SELECT hotel FROM Hotels
WHERE hotel.amenities
   Includes('Pool')

In addition, JBMS supports "replication" (although a better word for this capability is probably "synchronization"). JBMS's replication capabilities allow remote database users to connect to the home database intermittently. The package synchronizes the remote user's view of the database with the home database. The remote user can disconnect, perform modifications, and then reconnect at a later time, and JBMS automatically ensures consistency between the home and remote databases.

You can deploy JBMS in one o f two configurations. The first is an "embedded" form of JBMS: You embed the entire JBMS system in an application. JBMS is small enough (1.5 MB) to make this feasible. And if that's still too large, JBMS is modular enough so that you can excise unneeded portions. For example, if your application will be using predetermined queries, they can be compiled to Java methods. In that case, you can remove the portion of JBMS that parses SQL statements and yield a trimmer run time.

The other configuration is a client/server form. This requires a JBMS server engine (which uses the Web Logic remote JDBC drive). Client applications run a thin JBMS layer that communicates with the server. The advantage of this scheme is that it permits multiuser access to a database; the JBMS server is the access coordinator. (By contrast, the embedded configuration permits only single-user access to a database.)

Along with copious HTML- and PDF-based documentation, JBMS comes with Visual JBMS, a visual browser that allows you to inspect a JBMS database. Visual JBMS is unique in that it's written in Java. So, if you've stored Java objects and associated methods in the database, you can execute those methods on their associated objects from within Visual JBMS. (For example, if you've stored picture objects and the picture objects' class includes a display() method, you can, from within Visual JBMS, request the display method to display a picture.)

Cloudscape's product information is frank about the limitations of version 1.0. It does not support triggers, replication is incomplete, and some SQL-92 elements are not yet implemented. Cloudscape hopes that a future release will support "pluggable index methods," which would allow you to select the indexing method -- B-tree, hash table, or whatever -- your JBMS application will use.


Product Information


Cloudscape, Inc.

Phone:    510-873-0900
Fax:      510-873-0909
Internet: 
http://www.cloudscape.com


Visual Browsing Easy with JBMS

screen_link (49 Kbytes)

Visua l JBMS lets you browse the contents of a JBMS database.


Rick Grehan (Hancock, NH) works for Metrowerks' Discover Products division. You can reach him at rgrehan@austin.metrowerks.com .

Up to the Javatalk section contentsGo to next article: Java and UML Come Together
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network