3    Catalog Objects

In this chapter, we’ll explore the different types of catalog objects and walk through the two major options available for creating them. How you choose to create catalog objects has a profound effect on the security model structure and management processes.

Object privileges play an important role in the development of any SAP HANA security model. They define the types of SQL script actions a user can perform on a catalog object (also sometimes referred to as a database object). SAP HANA hosts multiple types of catalog objects. In this chapter, we’ll explore the different types of catalog objects that SAP HANA hosts. We’ll also explain different ways to create most catalog objects: Catalog objects can be created directly using SQL CREATE statements, in which case they’re called native catalog objects. The user issuing the SQL statement is the owner of the native catalog object. SAP HANA also supports the creation of some catalog objects as repository development artifacts, in which case they’re called repository catalog objects. Repository catalog objects are owned by the _SYS_REPO system account.

Because the principle of object ownership is a critical concept in all security models, the distinction between the ownership of native catalog objects and the ownership of repository catalog objects is important. Therefore, in this chapter, we’ll take a detailed look at the different options for creating catalog objects. The options your organization chooses when creating catalog objects is of critical importance to all security administrators. We’ll define different types of catalog objects, demonstrate how to create both native and repository catalog objects, review the process for deploying repository objects, and conclude with a case study to demonstrate real-world applications.

3.1    What Are SAP HANA Catalog Objects?

Catalog objects consist of various relational database management system (RDBMS) artifacts, such as tables, views, stored procedures, triggers, sequences, and a few other items. Items such as tables both store and define the structure of the data. Other items, such as views, are used to express query logic. The following list describes the most common catalog objects available in SAP HANA:

Now that you are familiar with the common catalog objects used in an SAP HANA system, let’s look at the options for creating them. For this discussion, we’ll demonstrate the processes necessary to create a schema and the processes necessary to create a table. We’ll highlight the differences between these options based on instances where we plan to use SQL statements and instances where we plan to use repository objects. How you create objects is important to your security model, so pay close attention to these options, focusing on how they affect an object’s ownership.