A relational database shared by an android app and a website - the easy way

后端 未结 3 407
再見小時候
再見小時候 2021-01-24 18:53

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 conf

相关标签:
3条回答
  • 2021-01-24 19:39
    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.

    0 讨论(0)
  • 2021-01-24 19:49

    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.

    0 讨论(0)
  • 2021-01-24 19:55

    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.

    0 讨论(0)
提交回复
热议问题