Showing posts with label Cluster Tables. Show all posts
Showing posts with label Cluster Tables. Show all posts

Tuesday, October 6, 2020

Differences Between Transparent Tables, Pooled Tables & Cluster Tables.

What Are The Differences Between Transparent Tables, Pooled Tables & Cluster Tables?



Differences between transparent, pooled and cluster tables are:

 Transparent tables have a one to one relationship with a physical table in an underlying database where as pooled tables and cluster tables have many to one relationship with a physical table in the underlying database (Relationship between tables in ABAP Dictionary & Underlying database).

 For each transparent table there will be exactly only one table in the underlying database whereas many pooled tables are stored in a single table in an underlying database called table pool. Similarly many cluster tables are stored in a single table in the database called a table cluster

 In case of transparent tables, the underlying database table will have the same name, same number of fields and the fields will also have the same names as defined in ABAP Dictionary whereas for pooled tables and cluster tables the underlying database table will have different name, different number of fields and fields will have different names from what has been defined in ABAP Dictionary.

 Transparent tables can have one or more primary key Whereas Primary key of each pooled table of a table pool need not be same whereas Primary key of each cluster table of a table cluster should have at least one key in common.

 Secondary indexes can be created for transparent tables, but for pooled and cluster tables we cannot create any secondary index.

 Transparent tables can be accessed via both Native and Open SQL whereas pooled and cluster table can be accessed by Open SQL only.

 Transparent tables are used to hold application data which includes both master data as well as transaction data. Pooled tables reduce the amount of database resources needed when many small tables have to be opened at the same time. Cluster tables are used when the tables have primary key in common and data in these tables are all accessed simultaneously.

Cluster Tables In SAP ABAP.

What Do You Mean By Cluster Tables In SAP ABAP? Also Explain What Do You Mean By Table Cluster?



Cluster Tables In SAP ABAP.

 A cluster table is similar to a Pooled table. It has a many to one relationship with a table in an underlying database. Many cluster tables are stored in a single table in an underlying database called a table cluster.

So table cluster is similar to pooled table pool. A table cluster holds only cluster table within it.

Table clusters store data from several cluster tables based on the primary key fields that they have in common.

Rows from the cluster tables are combined into a single row in the table cluster. The rows are combined based on the part of the primary key they have in common.

The biggest advantage of cluster table and pooled table is they reduce the number of database reads and thereby improve performance.

 Tables CDPOS and CDHDR are Cluster tables in SAP ABAP Dictionary and CDCLS is the table cluster that exist in the underlying database. CDCLS table contains or hold data of both tables CDPOS and CDHDR in the underlying database.