Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Using RecordStoreS as miniature database

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All of the books/tutorials/articles I've read thus far give examples of MIDlets using one simple RecordStore. I know that mobile devices are severely limited in storag space, but...
I am interested in creating a MIDlet that creates a mini database using multiple RecordStoreS, i.e. my MIDlet may contain 5 RecordStoreS, each one representing a "table" that can be related in some way to another "table". There doesn't seem to be anything stopping me from doing this (other than possibly storage space constraints), but does anyone have any experience in this area they'd like to share? Any insight?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I thought about using a RecordStore for one bug table, and then thought better of it. There is a product called pointbase, which gives you a small footprint database that can reside on a mobile device. They even have the ability to synchronize with a back-end database.
I say the toughest thing is getting all that data on the device in the first place. I this a first install create all the data, or whenever the user turns the app on (Bad choice there). There are just so many pros and cons to consider.
Could your application hold the data on the server end, and only return a small minute amount of data just when needed?
Good Luck
Mark
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I say the toughest thing is getting all that data on the device in the first place. I this a first install create all the data, or whenever the user turns the app on (Bad choice there). There are just so many pros and cons to consider.
Could your application hold the data on the server end, and only return a small minute amount of data just when needed?


Thanks for your response Mark. My MIDlet will not connect to any server - the data is purely local for the device user. It will behave more like an address book where records are added/edited on demand by the user. In fact, just to test out the RecordStore operations, I may start with a simple address book MIDlet.
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So then in your application, your user will add the records one at a time, there is no preloaded records.
I still think of RecordStores as places to put information that you would normally use a Properties class for, or some simple data storing that is needed to run the application, like User name/Password that the user chooses.
Maybe an address book, but wouldn't the phone already have one of those already built in? And how many addresses would a user be able to enter into the database before the memory runs out?
Good Luck.
Mark
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

So then in your application, your user will add the records one at a time, there is no preloaded records.


Yes, that's correct.

Maybe an address book, but wouldn't the phone already have one of those already built in? And how many addresses would a user be able to enter into the database before the memory runs out?

Yeah, I know that was just mentioned as purely a RecordStore learning exercise.
I am concerned about the space issue so I'm going to play around with it and get a feel for just how much data I can store (of course I also know that it depends on the device).
 
reply
    Bookmark Topic Watch Topic
  • New Topic