This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie - Best practice for a new .db ?

 
Alessandro Camel
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
what is the best pratice in order to have an app working with a sqllite db?
1-Create the db on the PC and put it in the apk ?
2-Using a webservice ?
3-Using a txt file and create the db the first time ?
4-..........
Sorry for the noob question... just starting here!
 
Tim Moores
Bartender
Posts: 2500
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally the app would create the DB programmatically. See http://developer.android.com/guide/topics/data/data-storage.html#db for links to two example apps that show how to do that.
 
Alessandro Camel
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Generally the app would create the DB programmatically. See http://developer.android.com/guide/topics/data/data-storage.html#db for links to two example apps that show how to do that.


Tim, thanks for the answer, but it's still not clear!

I understand the use of onCreate() and onUpdate(), but I have to insert in the DB about 500 lines.

I can have and xml and read it in the onCreate(), ok; but, also, I can use a webservice and read it once in the same method.
Both of these are working, but which is the "best practice" ? (if there is one!)

 
Jagadeeswara Yaramala
Ranch Hand
Posts: 46
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought this is of some help...!!
 
Alessandro Camel
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jagadeeswara Yaramala wrote:I thought this is of some help...!!


Thanks,mate!!!
It's a lot more than I asked!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic