HANA is many things. It is an own, in-memory database manager with columnar store by SAP AG. Including a number of newly-developed components for ERP, advanced planning, Business Intelligence, Analytics, etcetera.
What is special about SAP HANA’s database management system? In an earlier article, the key challenge of designing contemporary database management software has been described. On large data sets it has to work well for both row and column oriented operations. An ERP-application requests many, simple, row oriented read and write operations: request a row, update and store it. An analytics-application requests fewer operations, mostly reading, but on larger data sets. Simplified: the traditional row oriented organization of data is well-suited for Online Transactional Processing (OLTP, like ERP). The column store suits Online Analytical Processing (OLAP, like business intelligence) much better.
This time: Column oriented storage in SAP HANA.
Every table in SAP HANA is either row or column oriented, depending on the database’s design.
All column oriented tables are also made available in row oriented form by SAP HANA. This makes it possible to decide, before execution of any query on request by the user, which is the best way to access the data: via the row store or the column store.
HANA takes care that the row and column oriented versions of a table are kept in sync. The column store is highly compressed usually. Despite that, maintaining two versions of the same table requires extra memory capacity. And for every change to the data in a column oriented table (insert, update, delete), both versions of the table have to be adjusted.
Complicated? Using a column store makes dramatic improvements to the speed of queries on large data sets possible. For example, the number of sales order lines per (material-based) MTP-type.
The MRP-type is a material property that determines how the availability of a material should be planned. In SAP ERP, it is a simple code with usually only a few or a few dozens of possible values. A column store organizes this as a row of (pointers to) materials per possible value of the MRP-type. By doing this, a query that requires “materials per MRP-type” can be executed very quickly.
It gets even more complicated: delta-stores.