简体   繁体   English

android数据库到oracle数据库

[英]android database to oracle database

Can someone give me an idea or point me in the right direction about following matter: 有人可以给我一个想法或为我指出以下问题的正确方向:

I need to make android app that will do some things with remote oracle database (take some data, insert some data, ...). 我需要使android应用程序能够对远程oracle数据库做一些事情(获取一些数据,插入一些数据,...)。

I can do that, but the trick is, app owner needs to be able to do that offline (because he doesn't have internet everywhere), then when user connects to internet, somehow transfer those offline changes in local android database to oracle database. 我可以做到,但诀窍在于,应用所有者需要能够离线执行此操作(因为他到处都没有互联网),然后当用户连接到互联网时,以某种方式将本地android数据库中的这些离线更改传输到oracle数据库。 I never did something like that.Any pointers? 我从没做过这样的事,有指针吗?

Should I make same database structure in android database like that remote oracle database?Then somehow synchronize changes? 我应该在android数据库中像远程Oracle数据库一样建立数据库结构吗?然后以某种方式同步更改? Or is it done some other way? 还是以其他方式完成?

Thanks for any help. 谢谢你的帮助。

If you have the ability, it would be best to create a RESTful application on the server that listens for your app to contact it. 如果有能力,最好在侦听您的应用程序与其联系的服务器上创建一个RESTful应用程序。 Then it would take the data (send it from your app via JSON, XML or any of several other popular formats) and operate directly on the Oracle database by doing the adds/inserts/deletes there. 然后它将获取数据(通过JSON,XML或其他几种流行格式从您的应用程序发送数据),并通过在数据库中执行添加/插入/删除操作直接在Oracle数据库上进行操作。

You can do the same thing on the way down - your app contacts the server, the server provides data from the database in the form of JSON, XML, etc and your app can then operate on it's own internal JAVA objects of data. 您可以在下降过程中做同样的事情-您的应用程序与服务器联系,服务器以JSON,XML等形式从数据库中提供数据,然后您的应用程序可以对其自身的内部JAVA数据对象进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM