- Introduction
- PointBase Embedded/Server
- PointBase Micro
- Summary
PointBase Embedded/Server
The PointBase Embedded and Server 4.1 database products can be deployed using a single Java archive file (JAR) named pbembedded41.jar or pbserver41.jar (depending on which product you've licensed). Both JAR files are approximately 1MB in size. Comparing this installation to the mammoth installations spewed all over the hard disk by most commercial RDBMS is in itself a refreshing change! The products also come with two tools: Commander and Console. Counterintuitive to the applications' names, the Commander tool is actually a text-based SQL command prompt that allows the user to either run individual SQL statements against a database or run multiple SQL statements contained in a script file. The Console, meanwhile, is an advanced GUI application that initially presents the user with a paned window for query entry and results display (see Figure 1). A variety of menu options enable you to perform typical DBA tasks (create table, routine, index, user, schema, and so on), view the contents of system tables, and examine the database's catalog.
Figure 1 The PointBase console.
Individual database properties are contained in an INI file stored in that database's home directory. .INI file settings support the configuration of a number of properties, including log management, internationalization and cryptography settings, and cache-tuning information.
In terms of technical capabilities, you'll be pleased to find that PointBase fully supports the Entry and Transition levels of the SQL-92 standard and partially supports SQL-99. JDBC 1.2 is fully supported, as are portions of JDBC 2.0. A full complement of data definition, manipulation, query, and control language statements are provided, as is support for scalar functions, transactions, internationalization, and data backup/restore operations. Java developers who have worked with JDBC will not miss a beat when building their first PointBase app. The following code snippet demonstrates setting up a database connection, executing a query, and then looping through the result set:
try { Class.forName("com.pointbase.jdbc.jdbcUniversalDriver").newInstance(); Connection conn = DriverManager.getConnection ("jdbc:pointbase:server://embedded/informit", username, password); String query= "SELECT * from demo_table"; Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(query); while (rs.next()) { System.out.println("field1=" + rs.getString(1)); } rs.close(); stmt.close(); conn.close(); } catch (Exception JDBCStatementException) { JDBCStatementException.printStackTrace(); }
This is plain vanilla JDBC code: Open a connection, do a query, loop through the ResultSet, and then move on!
Advanced features include support for BLOB/CLOB datatypes, functions, and stored procedures. One nice feature common to the larger RDBMS is support for Java database functions and stored procedures. This involves the definition of a function or stored procedure in SQL with the actual code logic of the function/procedure being built in Java.
Close to the heart of all mobile developers is the topic of database synchronization once these databases get deployed far and wide in the field. PointBase supports full database synchronization through their UniSync product (purchased separately from the Embedded and Server products). Just as we saw with Oracle 9i Lite, PointBase uses a publish/subscribe model for synchronization of data between mobile PointBase clients and a wide variety of enterprise data sources (including DB2, SQL Server, Oracle, and Sybase ASE). On the plus side, the UniSync process supports recovery from failed synchronization sessions and the ability to dynamically upload schema changes (with data) to the mobile clientsomething not supported by Sybase SQL Anywhere's Ultralite deployment option, for example. On the minus side, the UniSync synchronization process cannot be fine-tuned to the level of Sybase's Mobilink or Oracle 9i Lite's Mobile Server synchronization servers.
The PointBase Embedded and Server products can run on any platform that can host a Java 1.1 (or greater) virtual machine. At installation time, the user is prompted to select a target virtual machine to be used by the database. The PointBase Embedded JAR file is approximately 1MB in size and a minimal database file is approximately 1.1MB in size, growing upward depending on the amount of data and the size of the schema. Clearly, this is comfortably within the storage capabilities of nearly all mobile devices (PDA class and up) in use today. PointBase Embedded is commonly deployed in mobile settings on Windows/Mac/Linux-based laptops, although it can run on PalmOS or Windows CE devices with the aid of a Personal Java-compliant JVM. If you're interested in this, Personal Java VM's are available for the Palm OS from Kada Systems and for Windows CE from Insignia and SavaJe.