Beginning with MIDP 1.0, Sun has provided a simple flat-file database record managment system for Java enable phones and PDAs. Generally, each record consists text information. This text is often read by the Java MIDlet and mapped to a Java data object for later manipulation or simply displayed on the handset in simple text. Field information within each database record, can be acquired with programming code that often limits the database application on the mobile device to a specific database record format, except where the entire record is displayed as simple text. If the database record format is changed (for example, if additional fields are added), the client-side programming code often must also be changed also to read and manipulate the new format.
The database system described here, funtions under MIDP 1.0 and can therefore be run on the simplest of mobile communication devices, assuming that the device can access the Internet via HTTP protocol (Sun requires that HTTP access be mandatory for all Java-enabled devices using the MIDP Java implementation). However, this client-side database system reads a server-side database file as the Java data types that the creator of the database file intended the individual fields of each record to be, not simply a line of text.
The creator of the database file, must write the file using the Java DataInputStream and DataOutputStream classes. The first write operation to the file must be a String indicating the record field format. Although this has the advantage of smaller size database files in some cases where the record fields are more often numbers rather than text, it does require more client-side programming power. But more importantly, this database program reads a format string from the server-side database file describing the record field format. In many cases the database record field format can be modified dramatically, and client's program can be informed of this change by virtue of recieving a new format string that describes the new record field format which prevents modification of the actual programming code.
When the user interface code is written wisely, fields can be added to the records in the database without change to the client-side code.
Although very much a work-in-progress, a working version has been tested on a Handspring Treo 180. Currently, the OJR H.S. Girls
Soccer Roster used as the database content for the test version available on via the Internet. The OTA installation process has not
been tested (the Treo 180 Internt browser does not handle the necessary mime types properly), but the .jad and .jar files are located
as shown below. We assume no liability for damages and you agree to assuming all risks upon file access.
The initial screen of the user interface is shown below as run on the Sun One Mobile Edition default emulator.
Click here to return to The Fieldmaster home page...