cancel
Showing results for 
Search instead for 
Did you mean: 

Explain the difference between hdi-shared & schema plan of the SAP HDI Containers service on CF?

boudhayan-dev
Employee
Employee

Hi,

I would like to know the difference between the hdi-shared plan and schema plan for the SAP HANA Schemas & HDI Containers service on SAP Cloud Foundry. Reference - HANA HDI Container

From what I have understood by reading developer tutorials and other blogs on SAP, is that, hdi-shared plan is to be used whenever we model the Database using CDS i.e. follow the CAP model of development. So, in that case if I am not following CAP model/ using CDS in my application, which plan would I select ?

For example - If I have an application in Spring Boot without any CDS layer. I'll define all my database artifacts using Hibernate's - Entity annotations which would create all the database tables during runtime. I have tried to set up the above scenarios using both the plans but only the schema plan works. If I use the hdi-shared plan, then hibernate gives an error saying cannot find the tables which is correct because Hibernate fails to create the tables on initialization.

This is pretty bizarre to me because hdi-shared internally does create a schema (with a technical name). So, if the schema details are available to me via the VCAP_SERVICES, why is hibernate not able to use that for table creation ?

So to summarize my questions, I'll break them down into sub questions -

  1. What is the difference between hdi-shared and schema plan ?
  2. If I do not use CDS - then why does my application (Spring Boot +Hibernate) work only with schema plan and not with hdi-shared plan ?
  3. If I have to make Spring Boot + Hibernate work with hdi-shared plan (kind of a hack for now ), I have to create the tables myself using the database explorer before pushing the application. Otherwise hibernate cannot generate the table. Why is it so ?
  4. Also, if you can explain which plan needs to be used when ?

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189718
Active Participant

Hi Boudhayan,

I can answer questions 1+4, a colleague will check 2+3. As you are working at SAP, you could also leverage your internal contacts and internal documentation.

The following documentation in the help portal explains the difference: https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/ebf0aa26958443f58f86b86205...

Basically, the schema plan only allows you to create a schema in a HANA database. If you need to create additional HANA specific artefacts, e.g. procedures etc., the HDI plan is the way to go. Schemas are also part of an HDI container.

Best regards,

Jan

boudhayan-dev
Employee
Employee

Thanks for the link. It explains a lot. It says though that schema plan provides just the schema and the artifacts (tables etc) needs to be created using ORM like Hibernate etc. So, in that case HDI-Shared also provides a schema. Why can't we deploy tables using Hibernate then ? Is it disabled by default?

pjastorga0929
Member
0 Kudos

By having schema plan, can I:

1. Develop calculation views?

2. Use Business Application studio?

Answers (0)