cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about Schema

Former Member
0 Kudos

Sorry in advance for asking such basic questions, I'm still trying to wrap my brains around HANA. 'Schema' seems to be somewhat of an ambiguous/vague word. All the questions below are in the context of HANA.

1. From my understanding, schema is nothing more than logical grouping of tables or data. Am I right?

2. Once you create a Attribute view using 2 master tables, isn't that technically considered a schema also?

3. When HANA is connected to ECC or BW, you see the "system" icon in HANA studio on the left. Do certain schemas automatically come over to HANA side or we have to create all of them from scratch from the new connected systems?

4. Is this how one should create a schema (what's a good business practice):

-- Created schema for material information ?

-- Created schema for Expense information ?

-- Created schema for Financial - Accounts Receivables ?

-- Created schema for data coming from a non-SAP source ?

^Please let me know if any of them are wrong.

5. Has HANA provided and standard schemas we can use or work off of?

6. Any do's and don'ts on schemas?

7. Can you share any schemas you created or worked with.

Please add any other information about schemas that would help me understand it better. Or any links with more schema information in the context of HANA.

Sorry for so many questions, and thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor
0 Kudos

Hi Mic,

Couple of points from my side:

  • Schema is a logical place for creating / maintaining Tables / views / DB objects. Whenever a DB USER is created, he is assigned a DEFAULT schema for his id.
  • All the objects created by the USER are created in the default schema for the user.
  • Objects related to the schema are DB objects.
  • You can have multiple objects related to DIFFERENT application in the same scheme. It is not necessary to create them in separate schemas. But if the application objects are much more to be able to manage effectively in a single schema, then they can be created in multiple schemas.
  • You can grant privs on different schema to a user, hence allowing access to the data from different schemas.
  • Although HANA provides standard system schemas, it is always advisable to create your own application specific users and schemas.
  • Avoid using systems schemas for application objects. It is not recommended.

Regards,

Ravi

Former Member
0 Kudos

Sri - thank you so much. I understand schema much better now.

When you said "BW Star schema == SAP Hana Analytical View" ...you mean the star schema concept is same/similar to the Analytic View concept in HANA?

Ravindra - Great points, very helpful.

2 questions:

1. Why is it not good business to use as much of the existing schemas SAP provides? For example, if SAP provided a schema for Material Master, wouldn't be a good idea to use it? (Kinda how like BI content in BW has standard objects to be used)

2. Or do you mean we should use them by copying them only, not using the standard schemas?

former_member213376
Participant
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

Srisap
Participant
0 Kudos

Hello Mic,

1. From my understanding, schema is nothing more than logical grouping of tables or data. Am I right?

    Schema is your personal workspace, where you can create tables/procedures/views on tables/column views. A schema is created when your ID is activated. And it has the same name as your user ID.

2. Once you create a Attribute view using 2 master tables, isn't that technically considered a schema also?

     Nope. Attributes views are created to give more dept to your analytical view. The run time objects are stored in the _SYS_BIC schema

3. When HANA is connected to ECC or BW, you see the "system" icon in HANA studio on the left. Do certain schemas automatically come over to HANA side or we have to create all of them from scratch from the new connected systems?
   Not Sure, but as far as I know you need to create a schema physically in the SAP Hana Studio and refer to that schema when doing a SLT or using BODS(these methods are used for data replication in Hana).

4. Is this how one should create a schema (what's a good business practice):

-- Created schema for material information ?

-- Created schema for Expense information ?

-- Created schema for Financial - Accounts Receivables ?

-- Created schema for data coming from a non-SAP source ?

   There is nothing wrong in having different schema(s) for different areas of data. Also while creating models you can access the tables from any of the schema.

Having a clear distinction in data for modules makes sense.

5. Has HANA provided and standard schemas we can use or work off of?

    You are provided with your own schema and it is basically your user ID.

6. Any do's and don'ts on schemas?

     If you have a CREATE SCHEMA system privilege you can create your own schema.

7. Can you share any schemas you created or worked with.

     You can refer to the

     http://help.sap.com/hana/hana_dev_en.pdf for SFLIGHT example.

I hope the above helps.

Thanks,

Sri.

Former Member
0 Kudos


Sri, I am somewhat confused. I have follow up questions: (sorry about the number of questions)

1. If schema is a personal workspace, then what are packages? I thought packages were personal workspaces (like folders).

2. Also, many developers can use the same schema, so how is it personal?

3. In BW, isn't a schema the relationship between fact tables and dimension tables (star schema)? Has the definition changed in HANA?

4. For example, is it good practice to create only 1 (or very few) material standard schema/s, rather than having many material schemas which are created for every project related to Material?

5. Can you create a schema for a non-SAP source (ex. flat file). So I created a schema for a flat file? (is it good practice?)

6. You said, "Also while creating models you can access the tables from any of the schema.". Why should one access tables in other schemas, isn't it better to create own schema with the relevant tables? (I'm assuming performance issue of replicating/loading data in schemas is the reason?)

7. Is this a better definition: "Schemas are like folders where tables are logically stored"?

Thanks in advance.

Srisap
Participant
0 Kudos

Hello Mic,

1. If schema is a personal workspace, then what are packages? I thought packages were personal workspaces (like folders).
    You are right packages are your personal work space where you create modeling objects. Sorry for the confusion.

2. Also, many developers can use the same schema, so how is it personal?

    See 1 above. For accessing the contents under a schema you need  to have the SQL Privileges defined on the schema.

3. In BW, isn't a schema the relationship between fact tables and dimension tables (star schema)? Has the definition changed in HANA?

    BW Star schema == SAP Hana Analytical View.

   

    As you said "Schemas are like folders where tables are logically stored"

4. For example, is it good practice to create only 1 (or very few) material standard schema/s, rather than having many material schemas which are created for every project related to Material?

   This all depends on your design which replication technology you are looking at ...

5. Can you create a schema for a non-SAP source (ex. flat file). So I created a schema for a flat file? (is it good practice?)

     It all depends on your design. That is the reason you have schema which is created same as your user ID. You can create a table under it and import the CSV file in that the table created. It also depends on what you are going to do with your data and I assume it would be for your personal development purpose only as the data in Hana would be coming in using replication methods that are available.

6. You said, "Also while creating models you can access the tables from any of the schema.". Why should one access tables in other schemas, isn't it better to create own schema with the relevant tables? (I'm assuming performance issue of replicating/loading data in schemas is the reason?)

If you have been given SQL privileges to access data in any of the schemas then why not. And the data in the schema suffices your need then why not.

You can create several schemas and each schema can have different tables. Depending on the replication method either SLT/BODS you can in case of SLT - LOAD/REPLICATE/STO REPLICATION/ RESUME your dataload.

You can just have 1 schema defined in your Hana system and several source systems can load data into it using SLT (this is a of SAP HANA SPS04).

7. Is this a better definition: "Schemas are like folders where tables are logically stored"?

   Yup. There are other objects too that you can define in schema.

Thanks,

Sri.