What’s new in SAP HANA SPS12 – SAP HANA Graph Engine
SAP HANA Graph is an integrated part of SAP HANA core functionality. It expands (the functions of) relational database management systems, with native support for graph processing, and allows executing typical graph operations on all data stored in a SAP HANA system; which is automatically optimizes execution plans to execute highly performant queries, and built-in graph algorithms based on flexible schema property graph data model, to traverse on relationships without the need to predefined modeling and complex JOIN statements.
So, in SPS12 release, the graph processing capabilities are added to current HANA platform, to allow business to map connections between entities in a network and discover relationships on the fly.
Graph Processing with SAP HANA
First of all, HANA graph engine was built as part of the Column store, it is a core functionality of HANA using In-Memory technology to store all the data, which means that the vertexes, edges, attributes, they all go to the main memory. And, In-Memory technology not only column wide storage, but also hardware technologies in the latest trends automatically (because it is part of HANA), and this is extreme good for analytics on large amount of data.
Also online querying, which means that you can work on real-time data, it is not static data, you can insert/update new nodes, or edges, and other meta data, whatever related to a graph. You can directly execute your query again, then you get new results because they are all supported online real-time.
Transparent combination of graph processing with all HANA engines on business, unstructured and spatial data
The SAP HANA database consists of multiple data processing engines, from classical relational data supporting both a row, and a column-oriented physical representation in a hybrid engine to Search, Text, Spatial, Predictive, and Graph processing for semi- and unstructured data management within the same system.
So, in HANA, basically it allows us to combine relational operators with text operators, with geospatial operators, and also with graph operators within the same execution plan. So, this capability really allows us to go back and forth between different logic of models within HANA.
And, they all go very easily and transferred in SQL. You don’t have to execute different statements and combine the results, you can do it in one SQL statement. And, you don’t have to replicate the data.
Native HANA graph algorithms
The built-in algorithms that you can dynamic change the parameters so that you can do graph traversing with different filters.
- Neighborhood Search, which is actually graph traversing; all we have to do is just to specify the start vertex, and then we define the depth where our algorithm has to stop, and we can define vertex or edge filters.
- Shortest Path, also called Single Source Shortest Path algorithm as it starts at ONE single source, and from this single source, we are calculating the shortest path to all other nodes in the graph.
- Strongly Connected Components, this is one algorithm that very useful in social media information.
- Pattern Match, which is the most flexible way to find if there is a pattern in your graph or sub–graph, or not.
Graph tools and visualization
There are two Graph tools: Graph Modeler, and Graph Viewer.
- You can define your own calculation scenarios in the Modeler, which run on the XSAdvanced, means that you can use it in the HTML or Browser.
- Another new tool, called Graph Viewer. It is a role based HANA Web application which means we only can see the graph we have permission to it after logged into Graph Viewer. It is as same functionality as Modeler, but Modeler is a little more static which stores all scenarios in the database; but with Graph Viewer, you have more dynamically interaction with graph. So, you can directly run graph algorithms, change parameters.
SAP HANA Graph Reference Guide:
SAP HANA Graph Data Model:
SAP HANA Academy video series on SAP HANA Graph processing: https://www.youtube.com/playlist?list=PLkzo92owKnVwCuJeNPcC7J_v4eT5_s6-d
Graph Modeling for XSA: