Skip to Content
Nov 01, 2019 at 06:55 AM

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



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 ?