将 Android 应用程序连接到 BlueMix 存储的 DB2 数据库 [英] Connecting Android application to BlueMix stored DB2 Database

查看:107
本文介绍了将 Android 应用程序连接到 BlueMix 存储的 DB2 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 Android 应用程序连接到存储在 BlueMix 中的 DB2 数据库?

How can I connect an Android application to a DB2 database stored in BlueMix?

我知道Android中缺少一些Java库,所以无法使用JDBC连接数据库.

I know that some Java libraries are missing in Android, so I can't use JDBC to connect to the database.

有什么想法吗?

推荐答案

您无法从 Android 应用程序直接与 Bluemix 上的 SQL DB 对话.您将需要在 bluemix 上创建一个与 db 对话的中间应用程序,并且您的 android 应用程序可以与该应用程序对话.您可以将此后端实现为 RESTful API(Java JAX-RS、Node.js w/Express 等).Bluemix 上的 Boilerplates 是一个很好的起点.

You can not talk directly to the SQL DB on Bluemix from your android app. You will need to create an intermediary application on bluemix that talks to the db and your android app can talk to that application. You can implement this backend as a RESTful API (Java JAX-RS, Node.js w/ Express etc). The Boilerplates on Bluemix are a good place to start.

Bluemix 上还有 Mobile Data 框架,通过设置为您准备好所有的移动后端.

There is also the Mobile Data framework on Bluemix that simplifies this by setting up all the mobile backend for you.

这篇关于将 Android 应用程序连接到 BlueMix 存储的 DB2 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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