• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using RecordStoreS as miniature database

 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • 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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic