Book Image

Real Time Analytics with SAP Hana

By : Vinay Singh
Book Image

Real Time Analytics with SAP Hana

By: Vinay Singh

Overview of this book

SAP HANA is an in-memory database created by SAP. SAP HANA breaks traditional database barriers to simplify IT landscapes, eliminating data preparation, pre-aggregation, and tuning. SAP HANA and in-memory computing allow you to instantly access huge volumes of structured and unstructured data, including text data, from different sources. Starting with data modeling, this fast-paced guide shows you how to add a system to SAP HANA Studio, create a schema, packages, and delivery unit. Moving on, you’ll get an understanding of real-time replication via SLT and learn how to use SAP HANA Studio to perform this. We’ll also have a quick look at SAP Business Object DATA service and SAP Direct Extractor for Data Load. After that, you will learn to create HANA artifacts—Analytical Privileges and Calculation View. At the end of the book, we will explore the SMART DATA access option and AFL library, and finally deliver pre-packaged functionality that can be used to build information models faster and easier.
Table of Contents (16 chapters)
Real Time Analytics with SAP HANA
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The SAP HANA SQLscript


In the following section, we will learn about the SAP HANA SQLscript and see the additional capabilities it brings along with it.

Why SQLscript?

SQLscript is a collection of extensions in Structured Query Language (SQL). The main motivation for SQLscript is to push data intensive application logic into the database, which was not being done in the classical approach where the application logic is mostly executed in an application layer.

We have the following extensions for SQLscript:

Extension

Usage

Datatype extension (create/drop type)

This allows definition of table type without corresponding tables

Procedural extension (create procedure)

This is an imperative construct to push data intensive logic into the database

Functional extension (create function)

This creates side-effect free scalar or table functions, which can be used to express and encapsulate complex data flows

How different is an SQLscript in SAP HANA from classical SQL queries?

Let's do a comparative study between an SQLscript in SAP HANA and classical SQL queries to find out what the point of differences are, as shown in the following table:

SQLscript in SAP HANA

Classical SQL

Multiple result sets can be returned

Query returns only single result set

More database intensive, codes are executed at DB layer, gives better performance

Limited executions at DB layer resulting in multiple access to and from database, relatively slow performance

Control logics such as if/else and business logics like currency conversion can be easily expressed

SQL queries do not have such features

Gives more flexibility to developer to use imperative and declarative logics together

No such flexibility with SQL queries

Supports local variables for intermediate result sets with implicit types

Globally visible views need to be defined even for intermediate result sets or steps

Parameterization of views is possible

Parameterization of views is not possible

The following figure shows you a graphical comparison of the classical approach and the SAP HANA approach: