views:

156

answers:

6

I notice most of the discussions about Blackberry database options are old, and generally not too informative.

As of today, March 31st, 2010, what is the best, most universally supported, free database option available for Blackberry developers?

I heard SQLite is available for JDE v5, but last I checked, that was still in beta, and I didn't want to commit to developing on a system that is not supported by most of the phones in service. Thing is, I don't see any dates on these claims. For all I know, the announcements I am reading are from 2008.

So, I am still on v 4.7. I need to use a relational DB for the app I am developing, but there aren't many resources for DB handling available - or at least resources that are useful to me. I find a lot of "tutorials" that assume you know everything there is to know about Blackberry development, or Java. But no complete classes or anything. Many of these examples don't even work. Eclipse gives warnings and errors from code copied and pasted from other people's examples.

I can answer any questions that may assist in this case. Hopefully, this thread will help many BB developers in the future.

+1  A: 

Before v5 I don't think there is a native relational database that you can work with on the Blackberry, the closest thing is the Persistant Store API, however I think that there are 3rd party libraries that you can use, like SQL Anywhere.

Fermin
+1  A: 

I will refer you to this answer

Michael B.
A: 

Thanks, I'm going to try out Perst and see if that does what I need.

Kai
A: 

In the Perst docs, this line says to import the jar file:

"Perst is distributed together with the perst.jarbuild. You can also build it yourself using the compile.bat script in the src directory. The only thing you need to work with the database is to include this JAR in your class path."

I tried looking up how to import a jar file into my project, and am slightly confused. Links like these: http://getablogger.blogspot.com/2009/09/how-to-include-external-jar-file-in.html http://www.blackberryforums.com/developer-forum/33039-import-external-jar-files-jde.html

Explain how to convert to library, pre-verify and so on. I am not familiar with these processes, and furthermore, my menu options are not the same as what is described, so I do not know how to compensate. I am using 4.7 w/ Eclipse plug in.

It seems odd that Blackberry development would be so complicated. Perhaps this is the nature of Java and not some Blackberry specific thing.

I suppose I am asking if anyone can verify that the above links are the only way for me to import the Perst package into my project. Perhaps there is a simple, more logical way.

Kai
A: 

Ok, in case anyone has had similar experiences with this, here is what I have done:

The JAR class path thing was resolved through no help at all from these sites. What I did to get an outside JAR included in my package was to right click the package name in the navigation menu (Eclipse) - then select Build Path - then add libraries. From this I was able to modify an existing library to include the JAR for the perst package.

Now I am able to import org.garret.perst.* We'll see if there are any complications.

Forgive the number of posts, maybe it will help someone else down the way.

Kai
+1  A: 

Depending on the Java dialect supported on your Blackberry version, db4o could also work well for your usecase. It's an object database, quite similar to Perst.

Carl Rosenberger