cancel
Showing results for 
Search instead for 
Did you mean: 

Using a third party cloud database in a mobile app

03-30-2021 4:10 PM
2483 views 13 comments
0 Likes
SAP Managed Tags
Subscribe

Hello!

There was such a question (I could not find the answer on the Internet): Is it possible to connect a third-party storage database (for example, PostreSQL) to a mobile application?

For example, in the "Mobile Connectivity" point, specify a route (url) to the database and for the application to take data from there?

If this is possible, can you show an example / guide / tell how you can do this?

Thanks in advance

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

ManuelStampp
Product and Topic Expert
Product and Topic Expert

Hello,

do you really want to connect the database directly to an app or is this rather an open question?

In most use-cases you'd implement an application server in front of your database for several reasons, but also in the baseline to allow communication by HTTP, and to integrate with our SDKs, specifically OData.

With SAP Mobile Services Mobile Back-End Tools you can either generate a service based on existing SQL tables (Working with Existing Database Tables - SAP Mobile Services Documentation).

Or you can create a new data model that creates its tables automatically (Service Generator Tool - SAP Mobile Services Documentation) in a bindable database (e.g. PostgreSQL).

Kind regards

Manuel

Former Member
0 Likes

Hello!

Rather, I would like to connect a third-party database (PostreSQL) located on another cloud, so as not to interact with Hana. For example, we use Yandex.CLoud with PostreSQL, and register the url from our database in our mobile application. Is this option possible?

ManuelStampp
Product and Topic Expert
Product and Topic Expert

Neither Gregor nor I mentioned HANA.

The question is, which protocol do you connect the app with?

Do you have secured query support via HTTP in your PostgreSQL DB?

If you want to leverage the benefits of our SDKs it should be OData protocol.

SAP as well offers tools for creating OData services with little effort (depending on complexity), like CAP and MBT and you can run them in any supported environment with specific restrictions.

Former Member
0 Likes

manuel.stampp, greetings!

I beg your pardon for the long answer. The point is what: I went through the tutorial from Gregor on "Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry" and I would like to understand how now this application can be linked to an Android mobile application built on Sap BTP For Android

gregorw
SAP Mentor
SAP Mentor

With cds-pg it might be an option for you to create a CAP application that exposes your PostgreSQL DB as an OData service that you can call from via the Mobile Service?

Former Member
0 Likes

Hello!
Can be more?

gregorw
SAP Mentor
SAP Mentor
Former Member
0 Likes

Good day! I went through this tutorial and deployed the applications, but now the question arose - how can I bind it to a mobile project (created in Android Studio using Sap BTP For Android) as a backend?

gregorw
SAP Mentor
SAP Mentor
Former Member
0 Likes

gregorw

I can't find something suitable

Former Member
0 Likes

That is, is it possible to convert this application created according to your tutorial into an OData service to connect the backend to a mobile application?

Former Member
0 Likes

Gregor, I welcome you! I figured out more or less with your adapter and was able to connect it to the mobile application - but tell me how the database change occurs on the backend (adding, deleting, etc.)

gregorw
SAP Mentor
SAP Mentor
0 Likes

Can you provide more details what you define as your backend. Already the CAP application might be a backend as it persists data. But if you need to persist data in an SAP ERP or SAP S/4HANA system then you need to connect to this system and consume the OData service.