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.
#Insight
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. Within SAP HCP, database schemas are created using any one of the following ways: 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. 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:Creating Database Schemas
Building Schemas with Java Applications