Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Personal Java Databases

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Nancy Lehrer
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Barron Snyder
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic