简体   繁体   English

我应该使用哪种类型的数据库?

[英]Which type of database should I use?

I have a question about which database I should use for my android and iOS apps. 我有一个问题,我应该为我的android和iOS应用程序使用哪个数据库。 I have not messed with servers before so please excuse my ignorance. 我以前没有弄乱服务器,所以请原谅我的无知。

Anyways, I am developing apps for a website that doesn't have a mobile version. 无论如何,我正在为没有移动版本的网站开发应用程序。 The website has a MySQL database and uses phpMyAdmin as a control panel. 该网站有一个MySQL数据库,并使用phpMyAdmin作为控制面板。

I need to figure out how to hook into the server. 我需要弄清楚如何挂接到服务器上。 I know that java provides full support for SQLite databases and I know that they server hosters can install SQLite on the server for me. 我知道Java为SQLite数据库提供了完全支持,我知道它们的服务器托管者可以为我在服务器上安装SQLite。

What do you all think? 你们怎么想 MySQL or SQLite? MySQL还是SQLite?

You should be using SQLite for any local databases to the Android app (CoreData for iOS). 您应该将SQLite用于Android应用程序(iOS的CoreData)的任何本地数据库。

Any interaction with your websites MySQL database should be handled through API calls. 与您的网站MySQL数据库的任何交互均应通过API调用进行处理。

There is a good PHP framework called Slim PHP that will make building your API extremely simple. 有一个名为Slim PHP的优秀PHP框架,它将使构建API非常简单。 It's documented very well. 记录得很好。 Slim PHP doesn't offer any form of ORM so I'd also recommend integrating with Idiorm/Paris , again their documentation is rather good so you shouldn't have a problem piecing this all together. Slim PHP不提供任何形式的ORM,因此我也建议与Idiorm / Paris集成,同样,它们的文档非常好,因此将它们组合在一起不会有问题。

Of course you can opt for a larger PHP framework that has all of this in one place, such as Symfony . 当然,您可以选择一个较大的PHP框架,将所有这些都放在一个位置,例如Symfony

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM