There are three types of database tables :
1. Transparent tables
2. Pooled tables
3. Cluster tables
Transparent tables :
1. It has one-to-one relationship with the table in the database i.e. table in the database has the same name as in the dictionary.The database table has the same name, the same number of fields, and the fields have the same names as the R/3 table definition.
2. We can use either Native SQL or Open SQL to access these tables.
3. Secondary indexes can be created and buffering can be done on transparent tables.
Use : Data of commercial relevance is usually stored in transparent tables.All application and user data is stored in transparent tables.
Pooled Tables / Table Pool : Several pooled tables can be combined to form a table pool.The table pool corresponds to a physical table on the database in which all the records of the allocated pooled tables are stored.Each Pooled table must be assigned to a Table Pool.
1. It has many-to-one relationship with the table definition in the database i.e. many pooled tables are stored in a single table in the database called a table pool.
2. Table Pools are used to hold large number of small tables.They need not have key in common.
3. Pooled table can be accessed only using Open SQL.
4. Secondary indexes cannot be created on Pooled tables and can be buffered..
5. The definition of a pool consists essentially of two key fields (Tabname type CHAR(10) and Varkey type CHAR(n) ) and a long argument field (Vardata type RAW(n) ).
6. The name of the pooled table is written to the field Tabname.
The contents of all key fields of the pooled table are written as a string to field Varkey and the contents of all data fields as a string to field Vardata.
The length of the string stored in Vardata is entered in field Dataln by the database interface.
Example of Pooled tables: A004, A005
Example of Table Pool : KAPOL
1. Transparent tables
2. Pooled tables
3. Cluster tables
Transparent tables :
1. It has one-to-one relationship with the table in the database i.e. table in the database has the same name as in the dictionary.The database table has the same name, the same number of fields, and the fields have the same names as the R/3 table definition.
2. We can use either Native SQL or Open SQL to access these tables.
3. Secondary indexes can be created and buffering can be done on transparent tables.
Use : Data of commercial relevance is usually stored in transparent tables.All application and user data is stored in transparent tables.
Pooled Tables / Table Pool : Several pooled tables can be combined to form a table pool.The table pool corresponds to a physical table on the database in which all the records of the allocated pooled tables are stored.Each Pooled table must be assigned to a Table Pool.
1. It has many-to-one relationship with the table definition in the database i.e. many pooled tables are stored in a single table in the database called a table pool.
2. Table Pools are used to hold large number of small tables.They need not have key in common.
3. Pooled table can be accessed only using Open SQL.
4. Secondary indexes cannot be created on Pooled tables and can be buffered..
5. The definition of a pool consists essentially of two key fields (Tabname type CHAR(10) and Varkey type CHAR(n) ) and a long argument field (Vardata type RAW(n) ).
6. The name of the pooled table is written to the field Tabname.
The contents of all key fields of the pooled table are written as a string to field Varkey and the contents of all data fields as a string to field Vardata.
The length of the string stored in Vardata is entered in field Dataln by the database interface.
Example of Pooled tables: A004, A005
Example of Table Pool : KAPOL
Cluster tables / Table Cluster : Several cluster tables can be combined to form a table cluster.Several cluster tables are stored in one corresponding table on the database.Each Cluster table must be assigned to a Table Cluster.
1. It has many-to-one relationship with the table definition in the database i.e. many cluster tables are stored in a single table in the database called a table cluster.
2. Table Clusters are used to hold few number of large tables that have common primary key fields.
Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.
3. Cluster table can be accessed only using Open SQL.
4. Secondary indexes cannot be created on Cluster tables and cannot be buffered.
5. A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key.
Use : A cluster is useful in the case where data is accessed from multiple tables simultaneously and those tables have at least one of their primary key fields in common. Cluster tables reduce the number of database reads and thereby improves performance.
Example of Cluster tables: BSEC, BSEG , EDID4
Example of Table Cluster : RFBLG ,EDI40
1. It has many-to-one relationship with the table definition in the database i.e. many cluster tables are stored in a single table in the database called a table cluster.
2. Table Clusters are used to hold few number of large tables that have common primary key fields.
Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.
3. Cluster table can be accessed only using Open SQL.
4. Secondary indexes cannot be created on Cluster tables and cannot be buffered.
5. A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key.
Use : A cluster is useful in the case where data is accessed from multiple tables simultaneously and those tables have at least one of their primary key fields in common. Cluster tables reduce the number of database reads and thereby improves performance.
Example of Cluster tables: BSEC, BSEG , EDID4
Example of Table Cluster : RFBLG ,EDI40
Additional Info on Pooled and Cluster tables :
1. Table pools (pools) and Table clusters (clusters) are special table types in ABAP dictionary which stores the data from several different tables.They should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation).
2. Pooled and cluster tables are generally created only by SAP and not by developers, due to proprietary format of these tables within the database and technical constraints to use within ABAP/4 programs.
3. In pooled table both INDEX and APPEND STRUCTURE is disabled while in cluster only INDEX is disabled.
4. Cluster tables must have one key common to assign to a Table Cluster but this is not the case for pooled table.