2 Introduction to SAP HANA
If you’re new to SAP HANA, this is the place to start. In this chapter, we’ll explain the ins and outs of SAP HANA and the different deployment options currently available.
When SAP HANA was first introduced to the business world, it was an in-memory database principally for SAP BusinessObjects Business Intelligence (SAP BusinessObjects BI). Since then, SAP HANA has evolved from just a database to the data platform at the center of SAP’s development of current and future products. SAP BW/4HANA is a fitting example of how SAP is optimizing its products around SAP HANA.
Organizations that have deployed an SAP HANA platform have the tools at hand to tackle problems that were once thought impossible. An insurance company is leveraging satellite data, geospatial microservices, and spatial processing, all powered by SAP HANA to better assess and manage risk; freight and airline companies are using SAP HANA for route optimization; retailers are identifying fraud and price-fixing with their suppliers; and all the information is available in real time. Monthly status reports can become a thing of the past with SAP HANA providing real-time data at your fingertips.
In this chapter, we’ll provide an overview of SAP HANA, including SAP HANA as an application platform, SAP HANA as a database for SAP applications, SAP HANA’s many deployment options, and virtualization of SAP HANA.
The goal of this chapter is to give you a comprehensive understanding of SAP HANA and hopefully make you comfortable with some of its associated key words and tricky phrases.
2.1 What Is SAP HANA?
To put it simply, SAP HANA is one of the fastest data platforms on the market. It’s an in-memory, column-oriented, relational database, a technology and a platform that gives companies the ability to perform real-time analytics and develop and deploy real-time applications. We’ll start by explaining the difference between traditional and in-memory databases, then we’ll get into the basics of SAP HANA.
2.1.1 Traditional Database versus In-Memory Database
In a traditional relational database management system, data is stored on disk. When the database has a request for data, it must be loaded into random-access memory (RAM) before being consumed by the central processing unit (CPU). That means the choke point in the supply chain of data is the speed of the disk. Because the average price of RAM per gigabyte has dropped significantly—from $189 in 2005 to $4.37 in 2015—an in-memory database is now an affordable option.
The term in-memory database means that all data is stored in RAM. With the data residing in-memory, the time-consuming task of data being pulled from disk to RAM is now removed. The increased speed provided by storing data in RAM is further accelerated using multisocket, multicore CPUs. The basic concept of an in-memory database is illustrated in Figure 2.1.
Figure 2.1 Basic Concept of In-Memory Database
It’s important to understand that there’s a difference between an in-memory database and a database with caching. A database with caching still uses the disk as the main data store and will create memory snapshots to speed up processing. Any changes or updates to the data can only be processed directly on the disk. Therefore, the only speed gain from caching occurs when accessing the same data with no changes. A database with caching provides improved performance over a traditional database, but it can’t provide the speed that a real in-memory database can.
2.1.2 SAP HANA
SAP HANA is a true in-memory data platform that still provides data protection by maintaining data on disk as a persistence layer. With SAP HANA, every action is written to logs called redo logs on disk. These redo logs are used like instant replays for the database in case of power outages and provide point-in-time database recoveries. Data from memory is pushed to disk at regular intervals, but is designed so that it doesn’t affect performance. Therefore, if there is a large workload on the database, this action will wait until there is sufficient server capacity so as not to impact performance. When nonvolatile RAM (NVRAM) becomes commercially available, the necessity for maintaining data on disk as persistence will disappear, because NVRAM doesn’t lose data when power is lost.
SAP HANA consists of multiple communicating services, as shown in Figure 2.2. The main component of an SAP HANA database is known as the index server. The index server contains the data stores and engines that process the data from incoming SQL or MDX statements. These statements are generated from authenticated sessions and transactions.
The persistence layer, as noted earlier, is responsible for the durability and atomicity of transactions. It ensures that the database can be restored to the most recent state after a restart.
SQLScript is SAP HANA’s own database scripting language. It addresses the problems from classical applications that tend to copy data repetitively to and from the database and those from programs that iterate over large data loops. SQLScript operates on tables using SQL queries for set processing, allowing for parallelization over multiple processors. Specialized and optimized functional libraries, such as BFL and PAL, can also be installed and integrated with different data engines of the index server. SQLScript can be used to call directly from these libraries.
The preprocessor is used by the index server for analyzing text data and extracting the information on which text search capabilities are based. The name server holds information about the topology of the SAP HANA system. In a distributed system, the name server keeps track of where data is located and what components are running on each server.
Figure 2.2 SAP HANA Database High-Level Architecture
SAP HANA creates a symphony of hardware and software working together to use the full potential of technology. Deployable in the cloud or on-premise, SAP HANA accelerates business processes and simplifies an IT environment by providing the foundation for all data needs. Companies are now working with enormous data sets, asking complex and interactive questions, and have an increasing need for the data to be recent or, better yet, in real time. SAP HANA can address all of those needs at lightning speed.
Now that you have a basic understanding of SAP HANA, let’s discuss some of the different implementations that SAP has to offer.
Further Reading
For a more in-depth look at SAP HANA, check out SAP HANA: An Introduction, available at https://www.sap-press.com/4160.