如何使用Android应用程序访问我的SQL数据库? [英] How to access my sql database with android application?

查看:290
本文介绍了如何使用Android应用程序访问我的SQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我新的支柱和Android。我们开发了一个Struts应用程序。现在,我们正在开发一些模块在android系统,其中待开发相同的功能。因此,它需要一个数据库(我的SQL)的相互作用。

I am new to struts and android. We have developed a struts application. Now, we are looking to develop some modules in android where same functionalities to be developed. So, it requires a database(my sql) interaction.

这将不胜感激,如果任何想法?

It would be grateful if any ideas?

将它需要PHP或Web服务?就是这样,请给一些教程来学习他们。在此先感谢...

Will it require PHP or Webservices? Is so, please give some tutorials to learn them. Thanks in advance...

推荐答案

这将需要网络服务,

您不能从您的应用程序访问您的MySqlSQL / Oracle数据库。只是因为这些数据库中部署一些其他的环境,而不能在移动环境中部署MySQL等大型数据库。

You can not access your MySqlSQL/Oracle database from Your application. just because of all of these database are deployed some other environment , and can not deploy huge database like MySQL on a mobile environment.

所以,你需要为访问这些数据库(MySQL的/甲骨文)。使用网络服务

So that you need to use web-services for accessing those database(MySQL/Oracle).

WebSerives :只是其中要求像一些服务器端脚本机制 PHP,ASP,JSP 等。
所有这些脚本具有访问MySQL数据库的API。最后,该脚本将返回结果在形式上 JSON / XML 到您的应用程序。通过HTTP连接。

WebSerives: Just kind of a mechanism which call some server side script like PHP, ASP, JSP etc. All these script have API for accessing your MySQL database. finally this script will return result in form JSON/XML to your application. through HTTP connection.

YourAPP - >它会执行一些和平code这跟你的服务器(调用Web服务 - > getStudent() - )

服务器 - > *它将执行类似getStudent() - SELECT * FROM学生 - > Budle数据成JSON / XML formet。 - >回报回应你的App *

Server -> *It will execute something like getStudent()- "select * from student" - > Budle data into json/xml formet. - > return as response to your App.*

YourApp - > 回调(学生数据) - >它会得到响应

基于Web服务的教程

这篇关于如何使用Android应用程序访问我的SQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆