SES 16: Persistence Services in Cloud Computing

The Persistence Service is an abstraction layer built into the Application Runtime Container that provides access to virtualized databases hosted in the cloud. It actually plays more of a behind the scenes role, taking care of low-level technical details like recovery and database backup, load balancing and scaling and connection management.


For SAP HANA XS application, there’s no need for a separate persistence service, since SAP HANA XS applications naturally have a direct connection to the backend SAP HANA database.

Managing Database Schemas

Since Persistence Service provides a layer of abstraction which sits on top of virtualized database instances hosted within the cloud. The basis of this abstraction is called database schema. Within SAP HCP, database schemas are logical databases associated with a particular SAP HCP account. Setting up database schemas is important for implementing persistence scenarios in SAP HCP.

Creating Database Schemas

Within SAP HCP, database schemas are created using any one of the following ways:

  • Using the create-schema command of the Console Client.
  • Interactively, via the SAP HCP Cockpit.
  • Automatically during the application deployment process.

Although the dynamic schemas creation is an innate behavior within SAP HCP itself, you can at least determine which database type you want the system to select for you during the creation process by clicking on the CHANGE button in the toolbar of the DATABASES & SCHEMAS tab. Here, you can choose the default database type within the correspondingly names DEFAULT DATABASE dropdown list.

Building Schemas with Java Applications

Initially database schemas are just empty partitions. In order to put a database schema to work, you need to bind the schema with a Java web application. This allows you to utilize JPA or JDBC APIs to create tables and fill them with data.

Much like schema creation process, schemas can be bound explicitly or implicitly. You can explicitly bind a database schema to an application using SAP HCP Cockpit or the Console Client via bind-screen command.

In SAP HCP Cockpit, you can bind schemas within the same SCHEMAS and DATABASES tab used to create schemas in the first place. Simply, select the target schema in the DATABASE and SCHEMAS panel at the top of the main content area and then create a binding by clicking on NEW BINDING button in the lower-level schema editor panel.

At this point, there are two main attributes you should configure:

  • DATA SOURCE: In order for your Java application to be able to address and access a binding, you must assign binding a data source name. The name can also be used to allocate data sources using dependency injections.
  • JAVA APPLICATION: In the JAVA APPLICATION dropdown list, select target application that you wish to define the binding for. List is automatically populated based on Java applications that are currently deployed within the account.

Follow our Blog for more updates and current offers!

[hubspot type=form portal=5934508 id=b37ebdfc-5650-4300-9817-b74e08369d72]

Business Consultation and Business Model

At SAP Expert Solutions, apart from SAP services, we actively indulge ourselves in Business Consultation and improve ourselves for the good too, helping small-scale business to scale-up their business growth and individuals to make extra income!

Thus, we have started an initiative to help some of you, on a regular interval basis. Get our Business Guide on Top Successful Business Models & Ideas, specially designed and curated by our Business Support Team. 

The Event Sale Timeline: 1st June 2019 – 1st October 2019

Follow and Stay tuned at SAP Expert Solutions for upcoming events and offers. So, gear up, brace yourselves and get ready for the Business Revolution!


Leave a Reply