1

I have a project where I will develop an android application and a website. They both should share the same database. I am trying to explore all the options and I am really confused.

Here are my requirements: 1- I need an extremely simple and EASY way. I am not trying to learn; I am just trying to get things done.

2- The database design includes relationships and foreign keys. Therefore, I need a relational database.

3- The users of the android app are limited; as it is not an app that will be on the store. And the rate of querying the database is not extensive, but the data stored will continuously increase. So, I guess scalability is important.

4- I do not have complex data types. Probably just text and numbers, although storing images would be nice, too.

5- I also want to mention that push notifications are needed.

I appreciate if you can provide me with examples for the option you recommend. I need to start as soon as possible.

Thank you

  • Looks interesting. Have you worked with it before? – Omar El-Masry Mar 19 '14 at 20:27
  • Yes I have. It is really simple to do rather cool stuff. Unfortunately my app is not on Google Play so cannot refer to that. Have made a demo that could possibly make skeleton for your website in case you want to learn Angular https://github.com/cyrixmorten/parse-angular-crud-demo. Took me a week to make it even though im not used to Javascript and new to Angular – cYrixmorten Mar 19 '14 at 20:39
  • Can I ask you about the parties that accessed the database in your application? Is it only a website or you also linked an app to the website, for example, as I want to do? – Omar El-Masry Mar 19 '14 at 20:56

3 Answers3

0

Well, after you make your database you can make api or web service that will allow your android app to interact with database, and regarding websites it depends on technology you are using (for example Entity Framefork in .NET).

Assuming you know how to create database.

Namazani
  • 53
  • 1
  • 9
  • I have created SQL databases before; but for local usage on PCs. So I have the concept. Do you have in mind a specific option? SQLlite? Windows Azure? Google cloud? I am not familiar with web APIs. If I understand correctly, you mean that the android app will not query the database directly, and it will trigger the API to do that for it? – Omar El-Masry Mar 19 '14 at 20:17
  • I would put api as part of my website for example. So when I call url mywebsite.com/api/getData from mobile app I would get some json response or mywebsite.com/api/setData to add to database. – Namazani Mar 20 '14 at 10:36
0

Take a look at www.parse.com

It is a really simple cloud based database with nice API's for a lot of platforms. They support push notifications and nice features such as saveEventually() so that you do not need a stable internet connection.

Regarding the website, I have created a demo for Angular that is aimed at generating a simple CRUD (Create update and delete) interface for simple Parse objects.

You can find it here: parse-angular-crud-demo

Disclaimer: Currently the project has taken me a week to implement, so might very well be some shortcommings and/or bugs.

Might be a good starting point for you.

My experience with Parse:

The app that I have been developing is for a fire department. It receives all the relevant information during a turnout as SMS messages and displays them in large text. It can display hydrants and relevant pdf files to the address that they are moving towards.

I have used Parse to support shared preferences (profiles) between devices and used push notifications to broadcast received information about an alarm. This makes it easy to add more devices and makes the installation much quicker (as there are a lot of settings).

For the larger files (hydrants and pdf) I have used Dropbox Sync API but could just as well have been done with Parse. So there is nothing preventing you from extending with image support later on.

cYrixmorten
  • 7,110
  • 3
  • 25
  • 33
  • I am really excited about it. Do you know if the free pricing plan is for commercial use or not? – Omar El-Masry Mar 19 '14 at 21:08
  • 1.000.000 requests to the API per. month and a total of 1gb of data is free. Everything above costs money. – cYrixmorten Mar 19 '14 at 21:17
  • That's great. I think that is enough for me for a long time. I now understand that your product is commercial. Are there any legal actions to take when you actually publish your product? Or you can use Parse directly in the commercial product? – Omar El-Masry Mar 19 '14 at 21:45
  • As far as I know there should be no requireries in that aspect. The only restriction that I can recall during my investigation before using parse is that it is not allowed to create multiple accounts to circumvent their request count, which makes total sense. – cYrixmorten Mar 19 '14 at 22:07
  • Sounds convenient ... Thank you so much for your help – Omar El-Masry Mar 21 '14 at 09:08
0
  1. you have to make a api on the web side to manage database transaction. There you can validate the entries from the mobile.

2.the mobile should connect to the api and transfer the data to the api. Since all data are inserted /managed by api (website) you can ensure relational features there and or can use triggers or stored procedures in database.

3.you can save the file name of image in database if required. I think it will be the nice way to do it.