cancel
Showing results for 
Search instead for 
Did you mean: 

How to develop cap application with external database

trimbandaru
Participant
1,244

Hi Everyone

We have MySql databse hosted on AWS.

I want to develop CAP application connecting to this external database.

Is this scenario possible? if so, could you please share references/steps?

Thanks

-Trim

Accepted Solutions (0)

Answers (3)

Answers (3)

vobu
SAP Mentor
SAP Mentor

for PostgreSQL it's absolutely possible with https://github.com/cap-js/cds-dbs/tree/main/postgres, see sample config over at https://github.com/cap-js/cds-dbs/blob/main/postgres/test/service-az.json

For MySQL there is https://github.com/Soontao/cds-mysql - haven't tried it, but might be worth a shot 🙂

vbalko-claimate
Contributor
0 Kudos

Thanks vobu,

what is the downsides of such app - deployed to external db? Cannot use other BTP services like XSUAA ?

I`m trying to figure out, how that CAP app is deployed.

1) after deployment, the app is "sitting" in BTP, but connects to external DB as a storage for data only

2) after deployment, app resides somewhere (where?), where DB sits.

Sorry for maybe dumb questions - I`m still in phase of discovery - even, when we have few CAP apps deployed (on PG on BTP)

vobu
SAP Mentor
SAP Mentor

well, CAP apps don't deploy to a DB, but into a runtime env such as CF. The DB used by the CAP app is just "another service" (in CAP "speak"), whether it sits within the same runtime env or remote. Note that "within the same runtime env" doesn't necessarily mean HTTP roundtrip cost saving as for example the PostgreSQL service "in BTP" also sits externally, requiring HTTP roundtrips.

Additionally, the CAP doc is excellent in terms of deployment: https://cap.cloud.sap/docs/guides/deployment/

trimbandaru
Participant
0 Kudos

Thank you vobu for sharing the references. Very helpful.

I will go through the mysql link and try it out.

during my search, I found the below information

https://cap.cloud.sap/docs/about/features#database-support

Does this mean, there is no official support for MySql from SAP CAP implementation point of view?

Thanks

-Trim

vobu
SAP Mentor
SAP Mentor

correct, no official MySQL support for CAP, "only" community support.

vbalko-claimate
Contributor

I cannot answer, but I`m also interested in this topic - if it is possibility to deploy (or at least connect) to the external db.

lleyton
Discoverer
0 Kudos

Hello,

did someone manage to connect to MySQL?

Would be highly appreciated if someone can share.

Thank you!