Online Tutorials & Training Materials | STechies.com
Register Login

HANA Data Types

|| 0

HANA Data Types
Stechies

Data Types in SAP HANA 

Working on any type of database requires a complete understanding of the database and its various types. This in-depth knowledge not only lets users work more efficiently with the various kinds of data but also know the limitations of each type of data. SAP HANA as well provides different types of data which are classified according to their usage and limitations.

SAP HANA Data types can be broadly classified into seven different categories which are as follows:

Category Data Type
Date Time DATE, TIME, SECONDSECONDDATE, TIMESTAMP
Numeric TINYINT, SMALLINT, INTEGER, BIGINT, SMALLDECIMAL, DECIMAL, REAL, DOUBLE
Boolean BOOLEAN
Character VARCHAR, NVARCHAR, ALPHANUM, SHORTTEXT
Binary VARBINARY
Large Objects

BLOB, CLOB, NCLOB, TEXT

Multi-Valued ARRAY

Date Time

This category refers to the type of data which is used to store date and time in a table. This comprises of:

DATE – which consists of date, month, and year in a default format which is YYYY-MM-DD in which YYYY is for the year, MM is for the month, and DD is for the date.

TIME – which consists of minutes, hour, and seconds in a default format which is HH24-MI-SS in which HH24 represents hours from 00 to 24, MI represents minutes, and SS represents seconds.

SECONDDATE – which consists of minutes, hours, and seconds along with date, month and year in a default format which is YYYY-MM-DD HH24-MI-SS in which YYYY is for the year, MM is for the month, DD is for the date, HH24 is for hours 00 to 24, MI is for minutes and SS is for seconds.

TIMESTAMP – which consists of date and time in a default format which is YYYY-MM-DD HH24-MI-SS-FFn in which YYYY is for the year, MM is for the month, DD is for the date, HH24 is for the hours 00 to 24, MI is for the minutes, SS is for the seconds and FFn is for fraction of seconds which ranges between 0000000 to 9999999.

Numeric

This includes numeric data used in a table and is classified as:

  • TINYINT that stores 8-bit unsigned integer between 0 and 255:
  • SMALLINT that stores 16-bit signed integer between -32,768 and 32,767,
  • INTEGER that stores a 32-bit signed integer between -2,147,483,648 and 2,147,483,647,
  • BIGINT that stores a 64-bit signed integer between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807,

And other such components.

Binary

This category refers to the storage of Binary data.

Large Objects

This category refers to the storage of huge amount of data such as images and texts documents.

Multi-valued

This section deals with multiple data of the same type.

Boolean

This refers to the section which deals with Boolean values, True and False.

Array

This category refers to the storage of an array of data of same type of data which at times may include null value too.

Thus, above mentioned are the SAP HANA data types that one must understand before being able to work on huge databases.