×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    SQL like data storage

    Hi,

    I need to read/write/update data which can be best stored in a SQL database. Is there some library, or even built-in functionality, for a database engine in JaveME for S40?
    In detail, I need this functionality:
    - SELECT something FROM sometable
    - UPDATE
    - INSERT

    Regards,

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: SQL like data storage

    Your principle mechanism is RMS, see the Java docs for the package javax.microedition.rms.

    It is not exactly "sql-like"! It's very primitive. You will probably want to build a layer on top of it, managing your data with objects, and using RMS to persist the objects.

    How much data do you want to store? I'm thinking in terms of number of objects, size of object (bytes), ...?

    Graham.

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: SQL like data storage

    The upper limit is about 5000 rows. Entries contain (short) strings, some integers and floats. The size of all data is not more than 10MB. As said, these are maximums. The average number of rows will probably be 1000.

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: SQL like data storage

    OK... some bad news... RMS is limited in size, and on Series 40 devices is nowhere near 10Mb. I think the newest S40s provide about 500k.

    You have two options for storage. RMS or FileConnection. Take a look at Persistent Data In Java ME in the wiki for a comparison.

    The FileConnection API comes with security restrictions, and your app will display a variety of prompts to the user asking for their permission. RMS doesn't have these security prompts, but comes with different issues...

    Graham.

  5. #5
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: SQL like data storage

    Thanks. I was hoping that there is some kind of database engine (library) which can handle simple queries but it seems that I have to implement this by myself.

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: SQL like data storage

    There are libraries of various sources and licenses, which sit on top of RMS. Here is a list - I think there's a list/comparison of them in the wiki, but I can't find it. Bare in mind that these don't work by magic - they have to sit on top of some persistence API that already exists, so are subject to the same limitations. There is a risk that you might end up with something fatter than you need, and a big wedge of application bloat.

Similar Threads

  1. What data storage class to use
    By ksadil in forum Mobile Java General
    Replies: 6
    Last Post: 2010-06-01, 09:30
  2. Data storage
    By j_charles in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-02-06, 22:59
  3. Nokia 6230: data storage and data transfer
    By ripiajo in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-19, 12:21
  4. Persistent Data Storage
    By joanntsc in forum Symbian
    Replies: 1
    Last Post: 2003-09-27, 02:26
  5. Persistant Data Storage
    By KrisM82 in forum Mobile Java General
    Replies: 1
    Last Post: 2003-09-19, 21:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •