25
ABAP Dictionary Tables in Relational Databases March-2005 ABAP Dictionary Tables in Relational Databases | 2.04

Chapter 04 abap dictionary tables in relational databases1

  • View
    243

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Chapter 04 abap dictionary tables in relational databases1

ABAP Dictionary Tables in Relational Databases

March-2005ABAP Dictionary Tables in Relational

Databases | 2.04

Page 2: Chapter 04 abap dictionary tables in relational databases1

Objectives

• The participants will be able to: – Describe the different types of tables in the SAP

ABAP Dictionary.– Explain the technical settings for optimizing the

storage and maintenance requirements.– Describe performance benefits through indexing.

March-2005ABAP Dictionary Tables in Relational

Databases | 2.042

Page 3: Chapter 04 abap dictionary tables in relational databases1

SAP Table Types

March-2005ABAP Dictionary Tables in Relational

Databases | 2.043

Transparent Table (TRANSP)

Structure (INTTAB)

Pool Table Cluster Table

View

Page 4: Chapter 04 abap dictionary tables in relational databases1

Transparent Tables

March-2005ABAP Dictionary Tables in Relational

Databases | 2.044

Master Data

SAP stores both master data and transaction data exclusively in transparent tables.

Transactional Data

Page 5: Chapter 04 abap dictionary tables in relational databases1

Table Types TRANSP in the Database

March-2005ABAP Dictionary Tables in Relational

Databases | 2.045

DB

PROFILE

Transparent (TRANSP) tables have a 1:1 correlation between the ABAP Dictionary and the physical database.

Page 6: Chapter 04 abap dictionary tables in relational databases1

Mapping a Table of Type INTTAB

March-2005ABAP Dictionary Tables in Relational

Databases | 2.046

DB xx

PROFILE

INTTAB tables are field strings (structures) which do not hold data.

They are not mapped to the database and have no underlying database tables.

Page 7: Chapter 04 abap dictionary tables in relational databases1

Pool and Cluster Tables: Overview

March-2005ABAP Dictionary Tables in Relational

Databases | 2.047

Pool Table Cluster TableCluster Table

Pooled tables can be used to store control data (e.g. screen sequences, program parameters or temporary data).

Cluster tables contain continuous text (e.g. documentation).

Page 8: Chapter 04 abap dictionary tables in relational databases1

Technical Settings

March-2005ABAP Dictionary Tables in Relational

Databases | 2.048

Master, Transaction Organization &

Customizing, UserData class

Number of data records in DB storage

Single records buff, generic area buffered, fully buffered

On or off

Size category

Buffering

Log data changes

Page 9: Chapter 04 abap dictionary tables in relational databases1

Data Class

March-2005ABAP Dictionary Tables in Relational

Databases | 2.049

User dataMaster data

Organization and Customizing dataTransaction data

DB

Page 10: Chapter 04 abap dictionary tables in relational databases1

Size Categories

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0410

A table’s size category identifies the amount of disk space on the database that is allocated to the table.

Page 11: Chapter 04 abap dictionary tables in relational databases1

Buffering Type

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0411

None

Single Record Generic

Full

KF1 KF2 KF3 F4 F5 F6 KF1 KF2 KF3 F4 F5 F6

KF1 KF2 KF3 F4 F5 F6

Page 12: Chapter 04 abap dictionary tables in relational databases1

Logging

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0412

On the technical settings screen you can specify “Log data changes” to automatically generate a log file of details on the structure of a table, a list of the data changes made during a certain period, and statistics.

Page 13: Chapter 04 abap dictionary tables in relational databases1

Maintaining Technical Settings

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0413

Data Class

Size Category

Buffering Type

Logging

Page 14: Chapter 04 abap dictionary tables in relational databases1

Demonstration•Observation of the technical settings of the SAP Table MARA and familiarization with the technical settings of a transparent table.

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0414

Page 15: Chapter 04 abap dictionary tables in relational databases1

Practice

•Observation of the technical settings of the SAP Table MARA and familiarization with the technical settings of a transparent table.

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0415

Page 16: Chapter 04 abap dictionary tables in relational databases1

Database Utility

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0416

ABAP ABAP Dictionary

Dictionary

DB

The Database (DB) Utility is a tool used in SAP to serve as a interface between the database management software (i.e., ORACLE, INFORMIX, DB2, INGRES, etc.) and the ABAP Dictionary

Page 17: Chapter 04 abap dictionary tables in relational databases1

Index

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0417

To improve performance, SAP automatically creates a primary index (id 0) for transparent tables based on the primary key. You can also define your own secondary indexes for transparent tables.

Page 18: Chapter 04 abap dictionary tables in relational databases1

Database Indexes

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0418

Index Table

Last NameLast Name First NameFirst Name PointerPointer

Adams Anthony

IDID Last NameLast Name First NameFirst Name SalarySalary

Zelkova Zephyr

Employee Names Employees

Burrows

Jones

Furia

Peters

Treske

Gregory

Gerry

Fred

Tim

Jimmy

Beth

Carolin

Page 19: Chapter 04 abap dictionary tables in relational databases1

The Telephone Book Analogy

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0419

Think of an index like a telephone book

Page 20: Chapter 04 abap dictionary tables in relational databases1

The Telephone Book Analogy (Contd.)

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0420

Page 21: Chapter 04 abap dictionary tables in relational databases1

The Index Range Scan

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0421

Sometimes an index doesn’t point to a single record, so it has to go for the Index Range Scan

Page 22: Chapter 04 abap dictionary tables in relational databases1

The Unique Index Scan

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0422

If each index record matches exactly one record in the table, and if all the fields of the index are specified in the query, a unique index scan can be performed.

Page 23: Chapter 04 abap dictionary tables in relational databases1

Evaluating the Various Types of Scans

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0423

Unique Index ScanUnique Index Scan

Index Range ScanIndex Range Scan

Full Table ScanFull Table Scan

A unique index scan is generally faster than an index range scan, because it has less data to sort through and retrieve.

Page 24: Chapter 04 abap dictionary tables in relational databases1

Summary• There are 5 different table types in the SAP ABAP Dictionary: Transparent tables,

Structures, Pool tables, Cluster tables & Views.• Technical settings allow you to optimize the storage requirements and table

access behavior of database tables.• Defining a data class has the effect of storing the table in a defined area of the

database when the table is created.• A table’s size category identifies the amount of disk space on the database that is

allocated to the table. • Buffering is only recommended for tables with data that typically does not change

or get updated.• To improve performance, SAP automatically creates a primary index (id 0) for

transparent tables based on the primary key. You can also define your own secondary indexes for transparent tables.

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0424

Page 25: Chapter 04 abap dictionary tables in relational databases1

Questions• What are the different table types ?• What is data class ?• What is size category ?• What is buffering ?

March-2005ABAP Dictionary Tables in Relational

Databases | 2.0425