将 android 与 MS SQL SERVER 2008 连接 [英] Connecting android with MS SQL SERVER 2008

查看:39
本文介绍了将 android 与 MS SQL SERVER 2008 连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将 Android 应用程序连接到中央数据库服务器(例如 MSSQLServer 2008)?

Is there a way that we can connect an Android application to a central database server (e.g. MSSQLServer 2008)?

我有一个可由网站和 Android 访问的 MySQL 数据库.从网站连接到数据库没问题,但如何从 Android 应用程序完成?

I have a MySQL database that is accessed by both website and Android. Connecting to the database from the website is fine, but how can it be done from the Android app?

推荐答案

这里有一些类似的问题(已回答):

here are some similar questions asked (an answered):

即使这些是针对 MySQL 的,它也应该通过更改引擎或驱动程序用于连接来适用于 MSSQL.通常,该方法是通过 Web 服务公开一些有限级别的修改.尽管如此,没有什么能阻止您直接访问数据库,尽管视情况而定,可能会带来安全风险.

Even though those are for MySQL, it should work for MSSQL by changing the engine or the driver's use to connect. Usually, the approach is to expose some limited level of modification through a web service. Still, nothing is stopping you from directly accessing the database, albeit depending on the case, could pose a security risk.

采用 Web 服务方法的主要原因:

Main Reasons the web service approach is taking:

  • 性能
  • 安全
  • 最佳实践
  • 关注点分离

一个例外是如果您想启用直接访问,因为您正在通过移动构建一种数据库客户端.

An exception is if you want to enable direct access because you're building a sort of database client through mobile.

这篇关于将 android 与 MS SQL SERVER 2008 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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