Hana Architecture Overview: “HANA” means High-Performance Analytic Appliance is a combination of hardware and software platform.SAP HANA Database is Main-Memory centric data management platform. The database runs on SUSE Linux Enterprises Server and builds on C++ Language.
SAP HANA Database can be distributed to multiple machines.
Few of the important HANA features are listed below:
- In-memory database- All operations read and write happen in memory
- Column stores- Enable massive data compression, partitioning and act as secondary indexes.
- Parallelism- Uses massive parallel processing across CPU’s
- Projections- choosing only the column we want to query on and running them in memory
- Dynamic Aggregation- no need of aggregates. Aggregation on the fly (ex. totals calculated during runtime thereby clearing up most of the space)
- Active and passive storage- only put most used data in active memory
- Real-time analysis, Real-time Replication (SLT)
- SQL Script- have complex calculations to the database which is not possible in the regular database.
SAP HANA Advantages are as mentioned below –
- SAP HANA is useful as it’s very fast due to all data loaded in-Memory and no need to load data from disk.
- SAP HANA can be used for the purpose of OLAP (On-line analytic) and OLTP (On-Line
- Transaction) on a single database.
- SAP HANA Database consists of a set of in-memory processing engines. Calculation engine is main in-memory Processing engines in SAP HANA. It works with another processing engine like
- Relational database Engine (Row and Column engine), OLAP Engine, etc.
- Relational database table resides in a column or row store.
Comparison between Row storage and column storage
There are two storage types for SAP HANA table.
- Row type storage (For Row Table).
- Column type storage (For Column Table).
Text data and Graph data resides in Text Engine and Graph Engine respectively. There are some more engines in SAP HANA Database. The data is allowed to store in these engines as long as enough space is available.
- We have an option to storing the table as row store or column store when we create the table.
- We have a row store data engine. It is optimized for high performance for the write operation.
- We use it when we want to write into the hana database.
- Data is read using column store engine
- Tables in the row based store are loaded at startup time whereas in the case of column based store it is loaded at startup on demand (during normal operation on hana db)
- Both engines share a common persistence layer.
Advantages of Column Store
- We have faster data access because only the affected column have to be read during the selection process of the query.
- Any column can serve as an index which provides faster access.
- We have better compression – because columnar data storage provides highly efficient compression – because the majority of the column contains a few distinct values.
- We have better parallel processing – data is already vertically partitioned. – So operations on different columns can be easily be processed.
- If multiple columns need to be searched, then each of the columns can be assigned to the different processor core for parallel processing.
Advantages of row-based:
- When the application needs to process single record in one time.
- The app needs to access whole record (not just column)
- If the table has small no of rows, then it doesn’t make difference if we use row store or column store.
Disadvantages of row bases:
- In the case of analytic applications – where fast search and processing is required – All the data has to be read – even the requirement is to access just a few columns
SAP HANA Architecture
Data is compressed by different compression techniques (e.g. dictionary encoding, run-length encoding, sparse encoding, cluster encoding, indirect encoding) in SAP HANA Column store.When the main memory limit is reached in SAP HANA, the whole database objects (table, view, etc.) that are not used will be unloaded from the main memory and saved into the disk.
These objects names are defined by application semantic and reloaded into main memory from the disk when required again. Under normal circumstances, the SAP HANA database manages unloading and loading of data automatically.
However, the user can load and unload data from the individual table manually by selecting a table in SAP HANA studio in respective Schema- by right-clicking and selecting the option “Unload/Load”.
Read about Hana High Availability Cluster Testing:
SAP HANA Server consists of:
- Index Server
- Preprocessor Server
- Name Server
- Statistics Server
- XS Engine
- SAP HANA Index Server
SAP HANA Database Main server is an index server. It contains actual data stores and the engine for processing the data. Index Server processes incoming SQL or MDX statement. Data loads, queries, calculation etc. are done here.
Below is the architecture of Index Server.
SAP HANA Index Server overview
- Session and Transaction Manager: Session Component manage sessions and connections for SAP HANA database. Transaction Manager coordinates and control transactions.
- SQL and MDX Processor: SQL Processor component queries data and send to them in query processing engine I.e. SQL/SQL Script / R / Calculation Engine. MDX Processor queries and manipulates Multidimensional data (e.g. Analytic View in SAP HANA).
- SQL / SQL Script / R / Calculation Engine: This Component executes SQL / SQL script and calculation data convert in calculation model.
- Repository: Repository maintains the versioning of SAP HANA metadata object e.g. (Attribute view, Analytic View, Stored procedure).
- Persistence layer: This layer uses inbuilt feature “Disaster Recovery” of SAP HANA database. Backup is saved in it as save points in the data volume.
This server is used in Text Analysis and extracts data from a text when the search function is used.
This Server contains all information about the system landscape. In distributed server, the name server contains information about each running component and location of data on the server.This server contains information about the server on which data exists.
Statistic server is responsible for collecting the data related to status, resource allocation /consumption and performance of SAP HANA system.
- It is central element of SAP HANA internal monitoring infrastructure.
- It notifies when critical alarm arises
- It provides historical monitoring data for analysis.
XS Server (Extended Services Engine) – Optional
- XS Engine Client connects HANA DB to fetch data via HTTP (say ARIBA)
- XS Server contains XS Engine. It allows external application and developers to use SAP HANA
- database via the XS Engine client. The external client application can use HTTP to transmit
- data via XS engine for HTTP server.
- Along with all these we also have Daemon Server
- Daemon server is used to start all other servers
- It keeps all other processes running.
Click on the link below to read the following blog posts