Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Website database to android

 
Ivan Kesic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making an application for android which uses sqllite database. Data for that database will be imported through website forms which uses mysql database (or mssql). What are my options in converting that database to sqllite understandable for android? It has to be automatic process that would occur every few minutes.

thank you
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual approach for a mobile app would be to access the server via HTTP, where you'd have a REST WS that returns whatever data needs returning in a format easily parseable on the device, like JSON.

Instead of having the app query the server in regular intervals, it may be better for the server to tell the app when to fetch data via a mechanism like GCM.
 
Ivan Kesic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what if database gets bigger and bigger. So i must convert json into my database file and import it in database. Is that after sometime going to take too long for every few minutes update?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do all DB records change every few minutes, so they'd have to be sent? That would be highly unusual. The usual approach would be to send the delta only - those records that have changed.
 
Ivan Kesic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm... App is showing a list of objects, and every object has information that can be viewed as details. Through website you can put an object in the list or remove it or change its data. So i am not sure if i can know what is changed unless i transfer sql code through json. Im not sure that is a common case in apps like this, although i really don't know
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It actually sounds like a very common case. So you need to keep track which items were added, and which deleted, and which changed, since the last time you sent an update to the mobile app. In the simplest case, that would be 3 lists of the associated IDs.
 
Ivan Kesic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your help. I will do just like you said and see how it goes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic