Runtime Structure of the Full-Stack Application

At runtime, the full-stack MTA is commonly made in the following way:
- The user interface is written using HTML5 and rendered/executed in a web browser.
- The HTML5 program communicates with the router via the HTTP protocol. The router is a program running on the server. It does not execute business logic, it is just a dispatcher of HTTP messages.
- The router dispatches the HTTP message to the proper application, running on the server. This application is built out of the corresponding Node.js (Java, Python, and so on) module, which is coded by the developer within the MTA project in the SAP Web IDE for SAP HANA.
- The Node.js application communicates with the database via a SAP HANA service, that is connected to a SAP HANA Deployment Infrastructure (HDI) container stored in the database.
- Database objects (tables, views, procedures, and so on) are stored in the HDI container.
- The procedures in the database use the SQLScript language (alternatively, R), that is specialized in highly parallel and data-intensive processing.
The SAP HANA Database Module

At design time, in the SAP Web IDE for SAP HANA, an MTA project is created.
The database content of the MTA is defined using the SAP HANA database module.
This module contains the design time definitions of all the objects to be created in the database, for example, tables and views, calculation views, procedures, and so on.
The SAP HANA Database Module Content

A minimal SAP HANA database module contains the following:
- An src folder, made to store the design-time definitions of the database objects.
- A minimal package.json file for configuration, for example, to set the version and the options of the deploy program.
The SAP HANA Service

A service of type HANA (technical name: com.sap.xs.hdi-container) needs to exist for the HDI container to be accessible from XS Advanced / 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 XS Advanced. This service instance is connected to the HDI container that is created in the SAP HANA database.