In SAP HANA, a schema is essentially a logical container or namespace that organizes and holds database objects such as tables, views, procedures, functions, sequences, and triggers. It provides a structured way to manage database content, avoid naming conflicts, and control access to data.
What a Schema Contains:
A schema can hold:
- Tables
- Views
- Stored procedures
- Functions
- Sequences
- Triggers
Why Schemas Matter:
Schemas help you:
- Organize objects so that different applications or teams can keep their data separate.
- Control access: Permissions can be granted at the schema level (e.g., SELECT, INSERT, EXECUTE).
- Avoid naming conflicts by namespace separation.
Types of Schemas in SAP HANA:
1.User Schemas:
*Created automatically when a user is created (if using classical user schema approach). *Example: Creating user JOHN creates schema JOHN.
2.Design-Time Schemas (HDI Containers)
In modern SAP HANA development (XS Advanced / HDI), schemas are managed by the HANA Deployment Infrastructure (HDI).
- Applications do not interact with raw schemas directly.
- HDI creates container-specific technical schemas to isolate application artifacts.
3.System Schemas:
Delivered by SAP and used by the system internally.
Examples:
- _SYS_BIC→ Generated calculation views and procedures
- _SYS_BI→ Business Intelligence content
- _SYS_REPO→ XS Classic design-time repository
Key Takeaways:
- A schema is a logical namespace in SAP HANA.
- It organizes database objects and helps manage security and isolation.
- Modern development uses HDI containers instead of manually created schemas.
Summary:
In SAP HANA, a schema is a logical container or namespace used to organize and manage database objects such as tables, views, procedures, functions, sequences, and triggers. Schemas help prevent naming conflicts, provide structure, and enable schema-level security by controlling access to the objects they contain. They can be user schemas (automatically created with a user), custom schemas (manually created for applications), system schemas (provided by HANA for internal purposes, e.g., _SYS_BIC or _SYS_REPO), HDI container schemas (managed by HANA Deployment Infrastructure for modern development), or temporary/session schemas (used for session-specific or intermediate data). Overall, schemas play a key role in organizing database content, separating application objects, and managing permissions efficiently.
Sign in to leave a comment.