I have been able to write MIDlets that use a db. Look up the RecordStore class. This class maps DIRECTLY to a palm DB.
For example if you have a Java RecordStore named "mystuff", a palm db will be created as "mystuff.pdb". When you hot sync, the mystuff.pdb file will be automatically transferred to the host.
Here is some example code the will write a record to a RecordStore
try{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeUTF("Bob Hendry");
dos.writeUTF(34);
dos.writeUTF("123.45");
byte[] b = baos.toByteArray();
db.addRecord(b, 0, b.length);
t.delete(0,t.size());
t.insert("Record Inserted",0);
}
catch(Exception e){
t.delete(0,t.size());
t.insert(e.getMessage(),0);
}