Should I use arrary or sqlite database?

  • Replies:3
  • OpenNot stickiedUnanswered
  • Forum posts: 2

Mar 17, 2017 11:17:13 PM via Website

Hello.

This is my first post to this forum seeking assistance on a APP I'll trying to create. I don't have no experience with android app development but, I'm studying and practicing.

I'm trying to build an app to record payments from a list of customers and print a receipt when paid. I download a list of customers with pending balance, using json array into android. Now, I'm confused, don't know if I should use arrays or a database to store the list, since I need to update (upload) later to the server. SQLite seems like an option but, I have to download the list every time user is connected to WiFi.

I guess I have to store the payments on an array and flush it once uploaded.

Can you please tell me what would be the best option for the tasks I'm trying to accomplish.

Thanks in advanced for your time and help.

  • Forum posts: 2

Mar 18, 2017 2:55:42 AM via Website

Jame_Watson

Thanks for replying. I leaning toward DB, the only thing is I would have to work with two databases (I don't know if that's possible) within the same app. One for the data received, and one for the payments received during the day. Upload and update the server with the new payments, once uploaded, delete the payment and customer DB and reload customer DB with the new updated info from server. This update will only happen if there is WiFi connection.

I don't know if that take too much resources but, sounds like it.