SAP HANA is a column-oriented, in-memory relational DBMS developed by SAP SE that is designed for hybrid (OLTP + OLAP) workloads. HANA also supports multiple advanced analysis, such as financial predictions, graph-data processing, as well as text analytics. It also offers Platform as a service on multiple cloud providers currently.
- Developer
- Country of Origin
- DE
- Start Year
- 2010
- Former Name
- SAP High-Performance Analytic Appliance
- Project Type
- Commercial
- Written in
- C++
- Supported Languages
- C++, JavaScript, PL/SQL, R, SQL
- Operating System
- Linux
- License
- Proprietary
SAP HANA is a column-oriented, in-memory relational DBMS developed by SAP SE that is designed for hybrid (OLTP + OLAP) workloads. HANA also supports multiple advanced analysis, such as financial predictions, graph-data processing, as well as text analytics. It also offers Platform as a service on multiple cloud providers currently.
History
The early development of SAP HANA was based on TREX search engine, P*Time, and MaxDB, which was mainly designed for the real-time data analytics and aggregation at first. SAP HANA also offers Platform as a service on multiple cloud providers currently. In 2016, SAP HANA 2 was released, which can also support Earth Observation Analysis and Text Analysis, apart from optimizing database and application management functionalities.
Checkpoints[04][05]
SAP HANA supports fuzzy checkpoints, where any updates are still stored in storage snapshots even if transactions are not committed. In that case, extra work is needed to remove those updates, if transactions are aborted. SAP HANA also supports encrypted snapshots when the original database is encrypted first.
Concurrency Control[06][07][08][09]
SAP HANA supports Multi-version Concurrency Control as the default mechanism to ensure data consistency. When one user connects to the database, a snapshot is provided for each user, where the changes from one user can only be seen by others only after transactions are committed. No rollback segment is supported by the insert method in SAP HANA. Distributed locking with a global deadlock detection mechanism and distributed snapshot isolation are both supported in SAP HANA to achieve synchronization. Moreover, one optional background garbage collection thread is also supported to remove expired versions.
Data Model[10]
SAP HANA is based on the columnar storage structure, where data are stored in columns to minimize the storage footprint because repeating values are only stored once. Specific. it is very easy to modify other structures to the columnar structure in SAP HANA due to its fast in-memory design.
Indexes[12]
SAP HANA supports multiple index data structures, including B+Trees, Compressed Prefix B+Tree, and Inverted indexes.
Isolation Levels[13]
In SAP HANA, the default isolation level is ReadCommited, and the maximum level is Serialization. Snapshot Isolation is not supported by default.
Joins[14][15]
Both Hash Join and Nested Loop Join are supported by SAP HANA. Different variants of Hash Join are used in SAP HANA mostly.
Logging[16][17]
Similar to other in-memory databases, persistent storage is also used for logging in SAP HANA. During the logging phase, only the real payload without any header is written service-specifically in SAP HANA. Moreover, it also supports third-party logging tools.
Query Compilation[18]
SAP HANA adopts LLVM JIT as the compilation backend for both stored procedures and query plans. One self-designed language called "Llang" is used to make the creation of LLVM-IR much easier. SQL-Semantics, Compile time, the degree of parallelism, keep running are key challenges that SAP HANA has to handle now.
Query Execution[19][20]
SAP HANA leverages the vectorized framework which can evaluate complex predicates and classify them based on the complexity to boost the performances. It works smoothly on the results extraction and unpacking for scanning predicates in the compressed in-memory columns currently.
Query Interface[21]
Apart from supporting SQL queries in SAP HANA, SQLScript, one self-designed scripting language similar to stored procedures in SAP HANA, is also supported, which can make users write complex queries more conveniently . In addition, MDX(multiple dimension eXpressions) is also supported, and it works to connect different analytics applications such as financial plannings directly.
Storage Architecture[22]
SAP HANA is an in-memory database. It uses in-memory computing technologies to store data with a complex data compression, which will improve the performance by avoiding too much disk I/O. Permanent storage of the data on disk is still required to achieve fault tolerance and the back-up operations will be executed asynchronously as a background task that will not influence the performance.
Storage Model[23]
SAP HANA supports both N-ary Storage Model and Decomposition Storage Model. However, it is optimized for DSM as a default storage model in order to provide high performance on a hybrid workloads of analysis and transaction. SAP HANA allows joining row-oriented tables with column-oriented tables and also supports altering the storage model of an existing table.
Stored Procedures[24]
SAP HANA supports stored procedure features by allowing clients to describe a sequence of data transformations and define as a reusable processing block. A Procedure can be created with SQP HANA SQL queries or Using the Modeler wizard (Modeler and Development perspectives). The stored procedures can be parameterized and reused in another procedure.
System Architecture[25][26]
For scalability support, SAP HANA uses multiple servers in one cluster and partitions the data to distribute across the servers with a shared-nothing architecture. The system has three components. The Name servers keep track of the location of data and store information on the topology of the entire system. The Index servers contain the actual data partitions and process the data as required. The last component is Statistics servers which collect information about status, performance and resource consumption from the system.
Views[27][28]
SAP HANA supports both materialized and virtual views. When a materialized view is created, the system validates the definition and precomputes the result set from the database, which is stored on disk to improve the performance. SAP HANA also allows virtual views which replace the stored result set by on-the-fly calculation and are derived each time when they are used.
Citations
28 sources- https://www.sap.com/products/hana.html sap.com
- https://www.sap.com/developer/topics/sap-hana.resources.html#resources sap.com
- SAP HANA - Wikipedia wikipedia.org
- Storage Snapshots | SAP Help Portal sap.com
- CMU SCS 15-721 (Spring 2018) :: Checkpoint Protocols cmu.edu
- http://sites.computer.org/debull/A13june/hana1.pdf computer.org
- CMU SCS 15-721 :: Concurrency Control (Part II) cmu.edu
- https://community.sap.com/resources/content-unavailable-archive sap.com
- http://www.csce.uark.edu/~xintaowu/BDAM/icdebulletin_hana.pdf uark.edu
- https://searchsap.techtarget.com/feature/Book-excerpt-How-the-SAP-HANA-platform-stores-data techtarget.com
- SAP HANA Advanced Modeling - Dr. Stefan Hartmann, Dominique Alfermann, Benedikt Engel - Google Books google.com
- CREATE INDEX Statement (Data Definition) | SAP Help Portal sap.com
- IsolationLevel property | SAP Help Portal sap.com
- EXPLAIN_PLAN_TABLE System View | SAP Help Portal sap.com
- http://sap.optimieren.de/hana/hana/html/sql_explain_plan.html optimieren.de
- https://www.sap.com/documents/2015/03/c86ff654-5a7c-0010-82c7-eda71af511fa.html sap.com
- Log Backups | SAP Help Portal sap.com
- Short Presentation Title llvm.org
- https://adms-conf.org/2013/muller_adms13.pdf adms-conf.org
- Proceedings of the VLDB Endowment vldb.org
- SAP HANA and In-Memory Computing | SAP Help Portal sap.com
- https://www.sap.com/products/hana/features/in-memory-database.html https:/help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.03/en-US/c39e5936ab9240a28cc85e1086315737.html?q=in+memory sap.com
- Columnar and Row-Based Data Storage | SAP Help Portal sap.com
- http://saphanatutorial.com/sap-hana-procedure saphanatutorial.com
- https://blogs.saphana.com/2014/12/10/sap-hana-scale-scale-hardware saphana.com
- Analysis of SAP HANA vs. Oracle MAA oracle.com
- https://blogs.saphana.com/2014/10/27/how-simple-finance-removes-redundancy-the-case-of-materialized-views saphana.com
- https://help.sap.com/docs/r/40c01c3500744c85a02db71276495de5/17.0/en-US/816d37a36ce21014bf6cacd0588a42f3.html sap.com