Introducing the SAP HANA Database Module

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Describe the main features of the SAP HANA Database module

Introducing the SAP HANA Database module

Watch this video to learn about the runtime structure of the full-stack application.

At design time, in the SAP Business Application Studio, an MTA project is created.

The database content of the MTA is defined using the db folder also called as SAP HANA database module.

This module contains the design time definitions of all the objects to be created in the database, for example:

  • Domain Models (Persistence).cds
  • Tables and Views(.hdbtable and .hdbview)
  • Calculation Views(.hdbcalculationview)
  • Procedures (.hdbprocedure)
The HANA components have to be selected during the creation of the CAP project alternatively they can be added later. This components are required to be able to create the HANA Native Artifacts. In addition additional configuration is required to enable the development of Native HANA Artifacts.

A minimal SAP HANA database module contains:

An src folder, made to store the design time definitions of the database objects.

A package.json file for configuration for the MTA project is required for example, to set the version and the options of the deploy program. In case of CAP projects this file is shared by all three modules.

Additionally datafolder is required in case the data has to be provided by files (.csv). The system identifies the files based on its placement under datafolder under dbfolder and generates the .hdbtabledata files for deployment.

A service of type HANA (technical name needs to exist for the HDI container to be accessible from Cloud Foundry. When you create a new SAP HANA database module, a service is also added by default to the mta.yaml file, together with the configuration required for the service to be accessible by the module.

When the module is built, a service instance (of type HANA) is created in Cloud Foundry. This service instance is connected to the HDI container that is created in the SAP HANA database.

Using the Hidden Configuration Files in the SAP HANA Database Module

The database artifact .hdiconfig specifies the plug-ins and the version to use when deploying a particular type of database artifact to an HDI container. The artifact type is defined in the file suffix, for example, .hdbcds or .hdbsynonym. The plug-in definition ensures that the appropriate runtime object is created from the specified design time artifact.

In SAP HANA HDI, name-space rules are defined in one or more file resources named .hdinamespace. The file resources must be located in the design time folder to which the naming rules apply, or the root folder of a hierarchy to which the naming rules apply. The content of the .hdinamespace file is specified according to the JSON format.

You can change the path defined in the name and, for the sub-folder, you can choose between append (add sub-folder name to object name space) and ignore (do not add sub-folder name to the object name space).

This concept will be used when working with the HANA Native Artifacts. In case of .cds we define the namespace within the file.

Save progress to your learning plan by logging in or creating an account