I am developing a location based app in J2ME. I am using a configuration of CLDC 1.1 & MIDP 2.0.
In that I have to stored place name, address, latitude, longitude, reminder text, and tone name in a database. My questions about RMS are:
1) When I close an app or restart an app; whatever records are stored by an app in RMS get deleted?
2) What is the maximum capacity of RMS of holding record. Is that infinite?
3) How many records can RMS hold without having the mobile system slow down?
4) Which J2ME Database system provide me efficiency, simplicity & speed in add, delete & update records. Does RMS provide that?
For your questions, the answers are given below:
1) When I close an app or restart an app; whatever records are stored by an app in RMS get deleted?:
When you close or restart the phone the RMS not deleted. When you call delete method in RMS then it is deleted. If you delete your application (Midlet suite) from device then the RMS associated with the application is deleted,
2) What is the maximum capacity of RMS of holding record. Is that infinite?:
I think it is based on how many memory available. If you store your application in the SD card then the RMS is also occupies the SD card memory.
If you store the application in the device memory (Not in SD card) then the RMS occupies the device memory (here device memory is much less).
4) Which J2ME Database system provide me efficiency, simplicity & speed in add, delete & update records. Does RMS provide that?:
The RMS meets your requirement.
But the records in RMS are stored as a flat file system. There is delete, insert method, etc in RMS API. But you need to build a logic to find which record is needed for delete, insert, etc. For instance, we want to delete the record in which age is >20 means we cannot use the query like delete from table1 where age>20
. Here we want to read the all the records one-by-one and find which records contain age>20, then we find position and delete with respect to position. Because we cannot use the sql queries in RMS. This is big disadvantage in RMS.