When you see "small footprint, zero administration, fully replicated, ANSI SQL, Java-based, and extendible object/relational DBMS," together with a stream of other buzzwords in a semitechnical brochure ı all in one sentence ı you may think that technical marketing is not sacred anymore. Thatıs what I thought. And when you see an upstart company taking on an already saturated DBMS market, you may think that nothing is sacred anymore. Well, thatıs just what I thought. But that is exactly what a new company named Cloudscape Inc. is doing. Worse still, these guys may just make it big time.
Based in Oakland, California, Cloudscape was founded in September 1996 by a group of database industry veterans, many of them former Sybase executives and engineers. They have employed a smallish set of highly skilled database engineers ı some of them highly regarded in the whoıs who of the database zoo ı to implement and deploy their brainchild product called JBMS. But wait! I am 10,292 miles and 10 time zones away from these people. I will probably never meet them. Iım not interested in the people; Iım interested in the technology they offer. I am really interested in whether they can deliver all the buzzwords they list, in one sentence, in their semitechnical brochure.
This first thing I do with a new product is study its architecture. You have to investigate the foundation to see where all the buzzwords fit in. The JBMS server comprises four configurable components: data storage, language access, network communication, and replication, as illustrated in Figure 1.
The data storage component of JBMS is used to store relational and object data. It can store relational tables of any size and Java objects of any complexity. It provides the traditional DBMS facilities, such as locking-based concurrency control, transaction control, and backup and recovery. It can be configured differently for different environments, such as single user, small footprint, or multiple users.
The language component of JBMS provides a subset of SQL-92 entry-level SQL and full Java types-compliant access to JBMS databases. The network component makes it possible for JBMS to operate without any networking at all or as a server that serves a number of clients through the JDBC API. It ships with JDBC client and server software. In the future, JBMS will also support the HTTP protocol, CORBA, and DCOM. The replication component can push part or all of a database, including the dictionary, data, and Java objects, to a set of subscribing clients. The subscriptions are defined at the replication source and conflicts are resolved transparently at the source. Replicated data is transmitted via email, HTTP, and other transport-independent messaging protocols. Because the replication mechanisms are message-based, remote replicated databases do not have to be connected continuously. A client can also "push back" row and object changes to their source. Replication conflicts can be detected and resolved by traditional before-image trigger-based mechanisms, with declarative referential integrity- and constraint-based mechanisms or through message replay. At press time, the JBMS replication mechanisms were not yet publicly available. They will be shipped with a special replication release of JBMS.
A JBMS system consists of a system directory and zero or more databases. The system directory contains all the configuration parameters in a properties file. It also contains an error log and other essential files. Each database is contained in a subdirectory under the system directory, with the same name as the database. You can have multiple instances of JBMS installed and running on a machine, but they should not access each otherıs databases, as this can cause data corruption and contention problems.
Cloudscapeıs JBMS is particularly useful in four application areas. JBMS can be shipped in a so-called tear-off configuration as a Java data storage and distribution engine embedded with an application, or it can be downloaded from a Web site as part of an application. In both these configurations, the JBMS server and the application run in the same Java Virtual Machine. Users are not even aware that they are using DBMS software under their applications.
JBMS can act as a proxy server for many of the leading databases. Mobile application programmers can develop local client applications against JBMS. Through its strong Java support and its JDBC interface, it is ideal for tools such as Borlandıs JBuilder and Sybaseıs PowerJ.
JBMS can cooperate with leading operational databases such as Oracle. It can extract the necessary data through gateways or heterogeneous replication mechanisms and manage this data as a Java-based database for Java-based applications. This is illustrated in Figure 2.
JBMS can, of course, be deployed in the classic client/server model. Java clients connect to the JBMS server through a JDBC plug-in server over the network. The JDBC server can open multiple connections to the JBMS server or it can make the calls in multiple threads of a single connection. JBMS then acts as a traditional database server for the Java-based database applications. At present, this is the only configuration in which multiple clients can access the same JBMS database.
JBMS is fully object/relational. Not only does it support relational data and Java objects, but it is also extendible. The JBMS query language is called SQL-J. It is a subset of the entry-level SQL-92 standard, with some extensions as described in the SQL-3 standard.
Data is stored in JBMS in relational structures, tables where the columns define the structure of the data stored in the rows. JBMS supports the standard SQL datatypes and Java classes as column datatypes. In addition to tables, a JBMS database can contain indexes, compiled statements, and configuration information.
You can implement Java Abstract Data Types (ADTs) to store and process complex rich data in any format. It is very easy to integrate a Java class with its methods into JBMS. You install the class library on the deployment machine and add the library to its CLASSPATH. The elements of the Java class are then accessible to Java methods that run in the server.
It is important to note that the object instances corresponding to the Java classes are stored in relational table columns. They are also processed in the same way as relational table columns. You can only change an object by retrieving it, changing it in the application, and storing it again. JBMS does not support persistent objects as a pure object-oriented DBMS would. To use a Java class, you specify SERIALIZE(CLASSNAME) as the columnıs datatype in the SQL CREATE TABLE statement. The Java classıs methods can be invoked like SQL functions ı they can be used as terms in SQL queries. If you have a Java class called HOTEL in the database, with a method called GETRATE(), you can have a clause like where HOTEL.GETRATE(ıJuneı) < 100 in a SQL query.
However, JBMSıs SQL implementation has some limitations. You cannot create an index on a column with a Java class as its datatype. The size of a row may be limited by the page size of the storage subsystem, but this can usually be configured. There are no group by, having, or aggregate operations in select statements for either Java or for SQL datatypes. You also have to specify many of the standard SQL functions as Java methods.
The equivalents of stored procedures and triggers are implemented as Java methods. The Java methods need not be stored in the database. JBMS can invoke any method of the classes available to the Java Virtual Machine in which it is running, similar to an application invoking a Java method. Methods that interact with the database are called JDBC methods. Although they are classified as application-side and database-side JDBC methods, there is no real difference. The code is exactly the same. The only difference is where the method is invoked.
JBMS can be extended with Java-based access and sorting methods. You can also add proprietary networking protocols, such as NetWare and IBM SNA.
Operations on a JBMS database are performed in the context of transactions, similar to a conventional relational DBMS, with commit, rollback, and savepoint operations. Each application can specify its transaction isolation level. JBMS 1.0 only supports serializable transactions, but future releases are scheduled to support the no isolation, read uncommitted, read committed, and repeatable read isolation levels as well.
JBMSıs locking-based concurrency control is performed at the table level, which may be too coarse for a multiuser configuration. However, the low overhead of table-level locks is useful for embedded and single-user configurations.
In JBMS, any SELECT statement generates a cursor, but you do not have to define the cursor using the SQL DECLARE CURSOR syntax. It is specified in SQL-J as a combination of Java methods and a SQL SELECT statement. A few specific forms of SQL SELECT statements can be specified for updating, which allows you to process them as an updatable cursor through which you can update and delete individual rows.
JBMS is extremely mobile. The database format can be ported to any platform, and the JBMS engineıs relatively small footprint means it can be shipped or downloaded with any application. As such, it can be embedded into any component of a distributed application, at any layer. A Java application that embeds a JBMS database can run on any hardware platform or operating system that supports a standard Java Virtual Machine. Such a package consisting of an application, a JBMS database, and the JBMS server is called a tear-off database in Cloudscape nomenclature. You can tear off slices from an enterprise database and deploy them on small, mobile, or remote platforms.
Because of its Java-based implementation, JBMS can be shrunk as well. For applications with a fixed set of well-defined queries, the query plans can be embedded into an instance of JBMS, which can be packaged without a SQL parser or query planner. This can reduce its footprint to close to 1MB. I suppose if they added shrinkable next to extendible in their buzzword sentence, I would not have read any further ı but if you think about it, this is a useful characteristic. We often wish for stripped-down DBMSs for fixed query benchmarks and applications. It is even more useful for downloadable Web applications and mobile database applications targeted at small-footprint devices such as laptop PCs for mobile workers, thin clients such as network computers, and "skeletal" clients such as personal digital assistants.
JBMS does not have many configuration settings, and its server does not require any tuning. It is very close to a full self-managing database. This, again, is extremely useful for Web and mobile database applications. The few remaining database administration tasks, such as backups, will be taken over by the JBMS Hub in a future release. The Hub is a multiuser version of JBMS, which contains a centralized management component that can control a number of local and remote JBMS instances.
JBMS provides two useful tools: ij and Visual JBMS. The JDK 1.1.1 (and higher) ij application is an interactive JDBC scripting tool for running scripts against a JBMS database. It is useful for creating database schemas and other repetitive database management tasks. You can use ij to access any JDBC-compatible database through any JDBC driver. Visual JBMS is a JDK 1.1.3 (and higher) application that provides you with a visual representation of a databaseıs schema in a typical Explorer view. You can use it to create and manage tables and to execute SQL-J statements against an open database.
Cloudscapeıs JBMS may just make it big time. Such a claim may need justification, which I will gladly provide.
JBMS is extremely lightweight, only requiring 2MB of memory and 5MB of disk space. Most of JBMSıs existing competitors, with the exception of products like Personal Oracle Lite, Sybase Adaptive Server Anywhere, and Harmonia (see the sidebar "Harmonia"), were designed to run on server machines with at least 16MB of memory or even more. Developed in Java, the platform-independent JBMS is extremely portable. Almost all its competitors were developed in C, which we all know is not as portable as it was intended to be. Also, with their large sizes and complex architectures and installations, you cannot easily embed these other DBMSs with an application or download them quickly from the Web. JBMS is very close to a zero-administration database. Most of its competitors still require a DBA for schema changes and some daily database maintenance tasks. It is extremely easy to extend the JBMS server with new Java class libraries to store and manipulate new rich datatypes with full query language support. As I mentioned in my "Extending Relational DBMSs" article in the December 1997 DBMS, implementing new datatypes in DBMSs such as Oracle and Informix is not a trivial task.
The initial release of JBMS (1.0) was shipped as a single-user version. It still has a few limitations, and it only supports a subset of the entry-level ANSI SQL-92 standard syntax. However, there is no doubt in my mind that it has enormous potential as a small-footprint, zero-administration, ANSI SQL, Java-based, extendible object/relational DBMS for embedded, Web, and mobile database applications. The multiuser JBMS Hub version, available in the first half of 1998, is targeted at workgroup-level applications and larger server-based databases. It will be interesting to see what inroads it makes on the already crowded server database market. At least, that is what I think.
| Cloudscape Inc., Oakland, CA; 510-873-0900 or fax 510-873-0909; www.cloudscape.com. |

Figure 1. The JBMS server comprises four configurable components: data storage, language access, network communication, and replication.

Figure 2. Through gateways or heterogeneous replication mechanisms, the JBMS can extract the necessary data from leading operational databases and manage it as a Java-based database for Java-based applications.
| Harmonia |
|---|
| Harmonia, a new DBMS from JB Development of Burlingame, California, is also written in Java and designed for use in Java applications. The Harmonia engine consists of Java class files. When embedded in Java applications, Harmonia's memory footprint is 800KB or less, according to JB Development. Harmonia supports JDBC and SQL. Developers can store data organized into Java classes in Harmonia databases. It also supports datatypes such as characters, numbers, date/time, and BLOBs. Harmonia is currently shipping in Lite and Pro versions. |