Store data from local db to Oracle MCS

230 Views Asked by At

I want to store contents of my local db to oracle cloud. I have searched the internet but cannot find any apis which can guide me to my result. The documentation is very naive and I cannot find a solution. Been searching for 3 days, help would be appreciated

1

There are 1 best solutions below

4
On

(Disclaimer: I work for the Oracle MCS team)

In response to your update that you want to store data in MCS.

Let's break this discussion into two parts, the MCS server side, and the client side which is Android in your case.

From a MCS server perspective you have two options for storage, the "Storage API" and the "Database API". The "Storage API" is designed to store files (aka. objects) in collections. The "Database API" is for more traditional data stored in RDBMS tables, columns & rows. So you need to make a choice which you think is more suitable for your needs.

Note that the Storage API is accessible external to MCS from a mobile client as a REST API, as well as node.js custom APIs within MCS that you would manually write. However the Database API is only accessible from node.js custom APIs. So if you choose to use the Database API you must also build server side custom APIs to expose the Database API to your client. With the Storage API it is already exposed to your client.

If we move onto the client side and what you need to do, you ultimately need to build your client to contact these server side APIs, which ever you choose as the description above. In building the client side you have two choices:

1) Manual - you create your own code to create, store and manage objects in the Android local db (eg. SQLLite), and then you need to write client side code to consume the MSC server APIs you've setup and read/write data from the local db. There is potentially significant work here, but, the MCS Android SDK will make this job easier as it provides client side libraries to call both the server side Storage API or Custom API (wrapping the Storage API or Database API) that we considered above, rather than you having to write raw REST calls.

2) Automatic - the MCS Android SDK also provide a "data offline & sync" SDK that takes care of the creation, store and management of objects in the device's database for you, and synchronising the data with the server side for you, based on a bunch of policies you pick. There is still some coding required, but mostly it's greatly reduced compared to the manual option above.

I'm sure you are already familiar with the MCS YouTube channel and it does cover how to build custom APIs, use the storage API, and does include videos on the Data Offline & Sync SDK too. Look to the playlists in the channel for the major topic areas. By chance I literally finished the Android video for Data Offline & Sync a couple weeks back (remember to watch the other data offline & sync videos before this one!), and it's not yet public. But you can have a sneak peak of the video here.

(A comment for future readers of this post: Please note that URL may change when we finally properly publish that video)