Database on Android

1

Hello! A few days ago, in a question I made here in StackOverflow, I said I was starting to develop for the Android platform. This week was very productive and I already have some ideas to apply, but I have a lot of doubts. I would like you to respond to me.

I thought of a project that could be used on both the computer and mobile devices. For this I will have to use webservices, correct? Could you recommend a suitable approach to this goal?

This is related to another factor, which is about data storage. In my studies, during this week, I created some things using SQlite. For a larger project can I use another bank?

Is data modeling also done in the way you usually see in desktop system development?

I know that there are already three questions, and that may seem conceptual. But it is that I am a little lost and I could not find anything very relevant in the courses that I realized in the last days.

Then. What are your thoughts?

    
asked by anonymous 10.07.2015 / 19:04

2 answers

0

If by "appropriate approach to achieve this goal" you mean what technology to use to make your webservices, choose the one you prefer. If it is easier with Java, use Java, otherwise it is common to use PHP.

The bank you are going to use on the device is one thing (and only SQLite is usually available). It has nothing to do with the database that you will have on the server and which your webservices will access. On the server we usually use MySQL, PostgreSQL, among others. Note that on the server the databases generally support concurrency (there are no conflicts when multiple requests are made to these banks), since in the SQLite of the device this competition is not supported and you need to implement manually (if there is a chance of more than one thread of your application try to access device data concurrently, otherwise you do not have to worry about that.)

The recommendation is: do not access the server bank directly from the device, do this through web services.

Yes, data modeling is also done in the way you usually see in desktop development.

    
10.07.2015 / 19:18
-1

You're going the right way.

Any type of access to "external database" (let's call it that way), should be done via WebServices. Take a look at this article link .

For internal storage on Android (database) you have SQLite to do this. But be careful, it's a very limited and simple bank, use sparingly so your application does not get too heavy and slow.

Note: Do not save images and / or files in SQLite, this makes the performance drop a lot.

On data modeling, it is relatively equal. You need to define both on your server where your WebService is and in your application modeling the data of your application. Only in SQLite beware of very complex modeling and relationships.

Abs.

    
12.02.2016 / 13:27