[英]What is the best way to store MySQL database for Android apps
I know this is not a type of question that should be asked on this platform, but I really need an good insight from the people who have worked in this field. 我知道这不是应该在此平台上提出的问题,但是我确实需要在该领域工作过的人有深刻的见解。 I want to set up a database for my Android app.
我想为我的Android应用设置数据库。 My app has no Image or Media data, it's all text for now, like user posts, likes and dislikes.
我的应用程序没有图像或媒体数据,目前只是文本,例如用户帖子,喜欢和不喜欢。 I am thinking of storing all this in SQL tables.
我正在考虑将所有这些存储在SQL表中。 I want to perform tasks like auto deletion of entries after a certain time they have been entered.
我想在输入一定时间后执行诸如自动删除条目的任务。 Store likes and dislikes, deletion of posts based on their dislikes, (if dislikes cross certain threshold, I want the post to be deleted.) I was thinking of using PHP and use hosting from a basic hosting provider like, hostgator or something like that.
存储喜欢和不喜欢的内容,根据他们的不喜欢内容删除帖子((如果不喜欢超过某个阈值,我希望删除帖子。)我当时在考虑使用PHP,并使用诸如hostgator之类的基本托管服务提供商提供的托管服务。 Though I am worried about the performance.
虽然我担心演出。 For now I don't expect large no of users, only few hundred a day.
目前,我不希望有大量的用户,每天只有几百个。 But they will be interacting with the database all the time for eg, liking a post, disliking a post etc. It would be really nice if someone could guide me into right path.
但是他们将一直与数据库进行交互,例如喜欢发帖,不喜欢发帖等。如果有人可以引导我走上正确的道路,那将是非常不错的。 Thanks!!
谢谢!!
You need to develop web services for doing that.According to me rest api is best for the task you wanna do. 为此,您需要开发Web服务。根据我的说法,rest api最适合您想要执行的任务。 check the link for demo.
查看演示链接。 http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-12-2/
http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-12-2/
您可以使用内置的SQLite数据库(这是android开发中的标准功能),也可以将它们存储在MySQL实例的服务器上的后端中,该应用程序可以通过一个宁静的Web服务访问您的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.