aspose file tools*
The moose likes Java Micro Edition and the fly likes simple database acess query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "simple database acess query" Watch "simple database acess query" New topic
Author

simple database acess query

faiza athar
Ranch Hand

Joined: Oct 30, 2001
Posts: 136
Hi
I am trying to build an application which has a database at the backend.
I have an ipaq and would like to know what to install for a java based development. Which dB is recommened and what should i install.
Thank you
faiza
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Are you talking about a database to install on the iPaq or on the server?
If your iPaq is relatively new, the installation cd should include Jeode, a JVM for the PocketPC platform.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
faiza athar
Ranch Hand

Joined: Oct 30, 2001
Posts: 136
Yes it is new. ipaq h2215. I still have to chk with the jvm.
Actually this is what i want to do.
1) retrieve a name from my database after choosing frm listbox entries - so its a relatively simple app with just a few data entries and their retrieval.
I was wondering if i should install Sun's toolkit or what!
Plz guide and thnx for replying!
faiza
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Ok. First of all, I'd suggest making the database query with XML-over-HTTP so you don't need to get a JDBC driver for MIDP. There are some tutorials for doing that kind of things around the web.
Second, yes, you should install Sun's J2MEWTK. However, I'd suggest installing the one for MIDP 1.0 if you want to distribute the application -- MIDP 2.0 phones will not be mainstream for a while... (ofcourse you can install both and see that it runs on both)
Frank Manno
Ranch Hand

Joined: Apr 06, 2003
Posts: 48
Originally posted by Lasse Koskela:
Ok. First of all, I'd suggest making the database query with XML-over-HTTP so you don't need to get a JDBC driver for MIDP. There are some tutorials for doing that kind of things around the web.

Lasse,
You brought up a good point. You mentioned using XML over HTTP (ie: SOAP or XML-RPC), however, in one of my courses (Mobile Java), our professor indicated that rather than transferring data via an XML format, you should consider using a script/servlet that runs on the server, and communicates with your service (ie: database, etc.). The script will then retrieve the results, and then simply return a string object to the MIDlet.
His main argument is that the MIDlet should process as little as possible. Although it does make sense, I'm not sure if I agree 100%, as there are solutions (ie: kXML-RPC/kXML) that allow for light-weight devices to handle XML transmissions.
What are your thoughts?


-- Frank
faiza athar
Ranch Hand

Joined: Oct 30, 2001
Posts: 136
Actually what i want is more of a log thingi...i want to enter info from listboxes in pda application which will be stored into tables, Then be able to retrieve it...like a SQL query.
But i need to know which jvm to use if i dont have any coming with my ipaq?
Plz help
thanx
[ November 13, 2003: Message edited by: faiza athar ]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Frank Manno:
What are your thoughts?
I think your professor is right. I also think I am right. It's a matter of balancing performance, flexibility and reuse.
If you're going for top performance, you'll perform all possible processing on the server and use a custom, tuned binary protocol for transferring data. However, this approach is so specific to your particular application that extending and reusing it will be harder than if you would have employed a standardized protocol (or even just custom XML) for which there are robust implementations available off the shelf.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Just to be sure, I'd like to clarify that using a servlet as an adapter between the Midlet and the database was exactly what I meant to refer to with "XML over HTTP".
faiza athar
Ranch Hand

Joined: Oct 30, 2001
Posts: 136
So should i download the java toolkit and ???
plz guide!!!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
1) Download a JDK ()http://java.sun.com/j2se/1.4.2/download.html
2) Download the wireless toolkit (http://java.sun.com/products/j2mewtoolkit/download.html)
faiza athar
Ranch Hand

Joined: Oct 30, 2001
Posts: 136
what about using pda profile for the ipaq???
has anybody tried that for pocketpc's?
plz comment!
faiza
[ November 18, 2003: Message edited by: faiza athar ]
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
I do not think there is a commercial implemention for the PDA profile yet -- I do not think there will be one soon. Plus, the PDA profile only gives you access to the device's native PIM "database" (address book etc.). It is quite different any SQL database.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
 
wood burning stoves
 
subject: simple database acess query