Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified
Accepted Solution

What data persistence option should I use given my current problem?

Hi,

Let me lay out my objective first. I need to replicate an app that we built for the IPHONE. The app in the IPHONE uses SqlLite as the DB. There are 8 tables in the DB. Each table has an average 400 rows and one of the table has 700 rows. Each table has 12 columns. The reason for describing in such detail is to support my deduction that I need a full blown Database rather than, say, Persistant Object Store. Or do I? That is the question.

I have a feeling that I should use SqlAnywhere's UltraLiteJ DB (and not SqlLite since i want to target OS 4.1). Is it a wise choice? If not, then what other DBs do I have to my disposal?

 

Much Obliged.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: What data persistence option should I use given my current problem?

i would say that's a good idea, implementing it yourself won't be worth it for a small project. don't know of any other databases.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: What data persistence option should I use given my current problem?

Agree with Simon, in general.  Some points:

 

a) The size of data that you are talking about is not too much to consider using Persistent Store, especially if this data is read only. 

 

b) Given that you are porting an iPhone App, I would suggest that you will need the newer devices to get a comparably look and feel, 4.1 will feel clunky (especially with the Scroll wheel).  Using SQL and therefore OS 5.0 might not be as restrictive, in terms of potential market, as you think.  I would continue to use SQL and just 'port' that part of your application, in as abstract a way as possible, then implement a replacement Database if you really think you need to. 

Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: What data persistence option should I use given my current problem?

Thanks Simon. Its a relief to know that all my reasearch was not futile Smiley Happy

 

I assume that you have used SqlAnywhere's UltraLiteJ DB. Can I request you to view this other query of mine related to this very issue? Here's a link for your kind viewing:

 

http://supportforums.blackberry.com/t5/Java-Development/Can-SqlAnywhere-s-UltraLiteJ-DB-tables-be-vi...

 

Much Obliged.

Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: What data persistence option should I use given my current problem?

[ Edited ]

Dear Peter,

Thanks for the detail reply. Its rare that someone goes through the trouble of sloving problems that aren't their own. For that I am grateful to you and this forum. I have a few further queries regarding the two points you have raised. So here goes:

 

a) At a later stage I need to be able to update,insert and delete the records in the DB using a Web Service. Plus, I thought that it will be practically impossible to implement this using Persistant Object Store strategy. If it is indeed possible, can you please very briefly summarize as to how could it be done.

 

b) Actually in my initial post I meant to say that I want to target Blackberrys running OS 4.1 and higher, because all Blackberrys in the market would not currently have OS 5.0 in them. There must still be a lot of Blackberrys using older versions. A bit of reasearch led to the conclusion that targetting OS 4.1 and above would suffice. Plus, I didn't exactly understand the 'Port' scenario, would you please elaborate it a bit. I apologize for my naivety but I am what you would call a newbie.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: What data persistence option should I use given my current problem?

a) Possible, but not easy.

Table == Vector, Row = element, then you need to write loads of manipulation logic.  In theory doable, and we have but that is because we started when 4.0 was new....

 

b) 75% plus of our App World downloads are 4.6 or later.  All 4.6+ devices can be upgraded to OS 5.0.  If someone wants your app so bad, they will upgrade. 

 

By 'Port', I mean leave your SQL Database as an SQL database, and develop initially for OS 5.0.  As a last part of this development, change to using another DB. By that time you will have a better idea what facilities you really need (and so the base OS level you want to go back to) and you will also have a better idea of the market.  Also it will be 6months down the line, OS 5.0 will be starting to look old hat because of OS 6.0.