0

I am trying to make an application, and it requires me to store the data somewhere. so i have to create a database and i have absolutely no idea about making database. i can make the android application for for the front end but i need help with storing, retrieving and manipulating the data stored online.

  1. How and where do i store the data online.
  2. What languages do i need to learn to do that.
  3. How do i access that data using internet.

Please guys help me out. just guide me to the sources, add links to the answer.

user3439988
  • 593
  • 1
  • 6
  • 9

4 Answers4

1

I guess you will have to follow the client - server protocol.

  1. Use SQLite Database (relational database) on the client (Android) to store data locally.
  2. On your server, get a Relational Database eg. On Amazon EC2 you can get one.
  3. Create an API for your application on the server, which will accept HTTP requests from the client and store data accordingly.
  4. Look into REST, Flask APIs to get started.
geekoraul
  • 2,623
  • 2
  • 21
  • 33
  • some followup questions please, i know how to do the first step: 1. What does Amazon EC2 do. do i create my database over there and store the data, and if i do, what language do i use. 2. if i do store the data on the server how does it communicate with android over the internet. – user3439988 Mar 20 '14 at 01:47
1

Not sure if you're asking how to create and use a database in Android, or online, so I'll try to answer both.

SQlite is the default embedded database solution in Android. You have two options here, but I'll go ahead and advise you to choose the former.

First option is to do it, as they say, "close to the metal" as possible. This means implementing your own contentprovider, your table structures, and all that. Here's a very nice tutorial on how to do just that.

Second option is to use an abstraction layer or whatever you want to call a library that does the heavy lifting and makes you stay away from coding the boilerplate stuff. There's a lot of choices out there, and each one differs in many ways -- some of them doesn't even use SQlite underneath. I suggest you take a look at this stackoverflow thread that lists some of the better persistence abstraction solutions available in Android.

Now for your question about storing stuff online -- if I understand correctly, what you want is a cloud server/solution setup. There's also quite a lot to choose from, and I'll let the other answers tell you what they are, but I personally recommend Parse. Storage is just one of the many useful features that it has, plus it also provides an Android API that simplifies all your network queries and result handling so that you don't have to deal with HttpConnection and JSON parsing. Plus it's free for small projects.

Community
  • 1
  • 1
josephus
  • 8,284
  • 1
  • 37
  • 57
  • Lets say I was making a dictionary, and the meanings were stored somewhere(but not the device). 1. do i create a database with Parse 2. how do i get the 'word' to the database and 'meaning' to the device(i'm guessing Httpconnections and JSONParsing) 3. do i need an address like 'http://www.xyz.com'(like your tutorial) 4. i read [this](https://parse.com/docs/cloud_code_guide?language=Android#started) but it doesn't tell about storing the actual data, how do i store the data over there. P.S. Sorry for so many questions. i know android but i'm a complete noob at this. – user3439988 Mar 20 '14 at 02:05
  • you don't need cloud code for your purpose. If you have your dictionary words and meanings in some file, Parse allows you to import those files to your database. – josephus Mar 20 '14 at 02:28
  • 1. yes, use parse to serve your data. 2. import it to parse. look at the "Data Browser" tab. 3. that's the package name, pretty sure you have that already. 4. go to Data Browser instead of Cloud code. – josephus Mar 20 '14 at 02:28
  • Thanks for bearing with me but just one last question: what if i intend to not use parse. and by package do you mean the package name for my android application. – user3439988 Mar 20 '14 at 02:47
  • if you're asking if you need a web address (your own server), then you don't. That's what Parse (or any of the other cloud solutions) is for. – josephus Mar 20 '14 at 02:54
0

First thing you need to do is have a domain registered.

Second: You need to learn a bit of PHP and MYSQL

Third : Your data will be coming as a JSON Format and so, you need to parse the json and then view it.

Here's a very good tutorial for all these:

http://www.mybringback.com/tutorial-series/12924/android-tutorial-using-remote-databases-php-and-mysql-part-1/

You can now store data and also view in your android app.

Hope this helps..:)

mike20132013
  • 5,357
  • 3
  • 31
  • 41
0

I have done mine with

  • A tomacat server
  • A mysql database

So pretty much you take all the info from user-input , serialize all, send them to a servlet and let the servlet take care of the database insert , update , delete ect , take the info from the servlet , serialize again and send them to your android app and show the info another possibility (which is the best one )is to try google web app as it integrates very well with android

Andi Domi
  • 731
  • 2
  • 19
  • 48