java - android连接数据库?
天蓬老师
天蓬老师 2017-04-18 10:27:28
0
4
515

学习android是我想连接mysql,但是在网上搜了一下,发现有几种方法,我想问一下,是用JDBC驱动,直接连接好呢?还是PHP+DBMS做服务器端,PHP将DBMS中的数据用json或者xml进行封装好呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all (4)
PHPzhong

The solution I have used is to request webapi through the app, and the webapi completes the interaction with the database

    刘奇

    The solution I have used is: PHP serves as the server and returns json. Hybrid development

      Peter_Zhu

      Normally, MySQL databases are not placed in Android applications. MySQL is too "heavy". Android applications generally use Sqlite as the local database. MySQL can be used as a remote database to store larger and more data. If it is placed on the remote server, there will be no direct connection problem. If the client wants to connect to the remote MySQL, it can use the network HTTP protocol (common POST and GET requests). This How to deal with this part, you have to learn back-end technologies such as javaweb or php.

        迷茫

        The Android client does not use mysql directly, but can use lightweight sqlite and realm databases. Any server language will work. Use REST API to interact, which is standardized http+json. If it is java, you can use jersey, springmvc. If the java server uses mysql, you must use the database connection pool

          Latest Downloads
          More>
          Web Effects
          Website Source Code
          Website Materials
          Front End Template
          About us Disclaimer Sitemap
          php.cn:Public welfare online PHP training,Help PHP learners grow quickly!