aspose file tools*
The moose likes Java Micro Edition and the fly likes Personal Java Databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Personal Java Databases" Watch "Personal Java Databases" New topic
Author

Personal Java Databases

Drew Lane
Ranch Hand

Joined: May 13, 2001
Posts: 296
Hope this is the right forum for this question...
If I write a program that needs to store data on my Zaurus using Personal Java, what are the best options?
SQL, Flat File, XML, etc.?
Ideally, it would have a small footprint, and be easy to manipulate.
Let's say it needs to be able to handle several thousands items and should be sortable, etc.
A SQL database would be ideal, but I don't want a big install and something that requires the user to configure.
XML seems reasonable, but I doubt PJ supports parsing XML. (?)
Or, is it best to seralize an object to a file?
Is RMS an option on Personal Java?
Drew
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427

A SQL database would be ideal, but I don't want a big install and something that requires the user to configure.

For SQL solutions, there are several choices. You can use an on-device database such as PointBase. Or, you can rely on backend databases. You can use the lightweight JDBC optional pakcage when it comes out. Or, you can access database via gateways.

XML seems reasonable, but I doubt PJ supports parsing XML. (?)

Of course there are XML parsers for PJ. Several XML parsers even DOM parsers are available for much smaller MIDP.

Is RMS an option on Personal Java?

Files are much more capable than RMS stores. But if you have to use RMS, you can use a utility called ME4SE to run MIDP programs on PJ.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Nancy Lehrer
Greenhorn

Joined: Aug 28, 2002
Posts: 14
If you just need something small for persisting your Java object, I've recently uncovered a product at linxpda.com call PJODe (The PesonalJavaTM Object Database Solution)
I haven't used it yet, but I plan on using it soon.
Nancy


Nancy Lehrer<br />Lead Solutions Architect<br />Amgen Inc.
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Originally posted by Nancy Lehrer:
I've recently uncovered a product at linxpda.com call PJODe (The PesonalJavaTM Object Database Solution)
I haven't used it yet, but I plan on using it soon.

Let us know your experience after you try it!
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Originally posted by Drew Lane:
A SQL database would be ideal, but I don't want a big install and something that requires the user to configure.

You've just described hsql
Pooja Bhatia
Greenhorn

Joined: Oct 20, 2002
Posts: 1
Hi drew,
We are currently exploring the use of a relational Db called InstantDB. It has a small footprint and is ideal for use on Pocket PCs.
http://tinman.cs.gsu.edu/~cscjghx/insdb/instantDB.html
You can refer this tutorial Put up by my colleague Jim.
Good Luck
Rgds
Pooja



Pooja Bhatia
Barron Snyder
Greenhorn

Joined: Nov 01, 2002
Posts: 3
As previously mentioned, take a look at hsqldb. There's even a compiled .ipk for easy installation on the Zaurus and a gui frontend for table creation!
From the website:
hsqldb is a relational database engine written in Java, with a JDBC driver, supporting a subset of ANSI-92 SQL (BNF tree format). It offers a small (about 100k), fast database engine which offers both in memory and disk based tables. Embedded and server modes are available. Additionally, it includes tools such as a minimal web server, in-memory query and management tools (can be run as applets or servlets, too) and a number of demonstration examples.
-Barron
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Personal Java Databases