简体   繁体   English

为Android应用存储MySQL数据库的最佳方法是什么

[英]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.

相关问题 为iOS / Android应用存储敏感数据的最佳方法是什么? - What's the best way to store sensitive data for iOS/Android apps? Android:在数据库中存储矩形坐标的最佳方法是什么? - Android: what is the best way to store rectange coordinates in database? 在Android上的数据库中存储事件的最佳方法是什么? - What's the best way to store events in a database on android? 在本地(多种语言)Android应用程序中存储和检索字符串的最佳方法是什么? - what is the best way to store and retrieve strings in vernacular(multiple languages) android apps? 将uri存储在mysql数据库中的最佳方法 - Best way to store uri in mysql database 在Android上的数据库中存储资源ID的最佳方法 - Best way to store Resource id in Database on Android 什么是在Android中存储用户数据的最佳方法 - What is best way to store user data in Android 在Android中存储大量图片的最佳方法是什么? - What is the best way to store large no of images in Android? 在android中存储本地的最佳方法是什么? - What is the best way to store local in android? Android,将图像存储到SQLite数据库并从db获取图像的最佳方法是什么? - Android ,What Is The Best way to store image to SQLite database , and retreive image from db?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM