且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在应用程序和Web之间共享数据库

更新时间:2022-12-21 18:00:16

FYI,无需任何服务器通信(网络服务),则不能在android应用程序中使用网站数据库。



如果要管理网站和android应用之间的通信意味着您需要一个具有Web /移动应用程序数据的集中式服务器(可能是我的sql dab)。因此,在那之后,通过使用Web服务方法(REST / SOAP),您就可以实现它们之间的通信


一个使用php的sqlite数据库并将
将该应用程序直接连接到数据库,但是我还没有找到执行
的***方法。


这不是将移动应用程序与数据库连接的正确方法。相反,您应该创建一个在服务器上运行的中间件(REST / SOAP Web服务)。该中间件将依次与数据库和您的移动应用程序连接,无论是android,iOS还是Windows应用程序都可以与此中间件进行通信。


I'm involved into an app that have to retrieve queries from an existing database. This db have to be implemented in php in a remote server, and will be the place where the admin will have to insert content into the shared db, but I don't know how to implement that correctly or what is the best solution.

I'm thinking about make a sqlite database with php and connect directly the app to the db, but I haven't found yet the best way to do that.

What do you think? Thank guys.

FYI, without any server communication (Web services) you can't use the website database in android application.

If you want to manage the communication between the website and the android app means you need a centralized server (probably my sql dab) which having the data of your web/mobile applications. So, after that by using the web service methods (REST/SOAP) you can achieve the communication between them

I'm thinking about make a sqlite database with php and connect directly the app to the db, but I haven't found yet the best way to do that.

This is not the right approach to connect mobile applications with the database. Instead you should create a middleware(REST/SOAP webservice) which runs on server. This middleware will in turn connect with the database and your mobile app whether it is android, iOS or windows app can communicate with this middleware.