Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP - Database Accesses →  Databases - Overview 

Relational Databases

Other versions: 7.31 | 7.40 | 7.54

The Relational Data Model

Application software models a part of the real world. This type of modeling is based on the relational data model. A data model describes reality using formal structures. In the relational data model, the only formal structure used is known as a relation or table. All the information about the modeled area of reality is represented as values in tables.

A table is a two-dimensional matrix which consists of rows and columns (fields).

The value range of a field (the set of permitted values for the field) is also known as the domain of the field.

A field or combination of fields which uniquely identifies every row in a table is known as the key. This is a minimal attribute: if one of the fields is removed from the key, the remaining fields cannot uniquely identify the table rows.

Each table must have at least one table key (primary key integrity). However a table usually has multiple keys. During the modeling process, only one key is defined as the primary key.

In the relational model, the relationship between objects is expressed in terms of a foreign key. A combination of fields in a table is known as a foreign key, if it is also the primary key in another table.

In an AS ABAP, the data model is managed in the ABAP Dictionary, which results in a close compliance with the ABAP type concept.

The Relational Database

All the data relevant for all applications of an AS ABAP is collected and managed centrally in a relational database. All ABAP application programs work with this data by default. The largely standardized language SQL can be used to access relational databases. Application Server ABAP supports database systems from different vendors. SQL is embedded in the ABAP language either with standardized Open SQL or vendor-specific Native SQL.


Note

The primary table key (key fields for a database table of AS ABAP that build the table key) can have a total size of 900 bytes. However if a key is larger than 120 bytes, the restrictions apply:

  • Table contents cannot be transported by specifying the complete key values. Instead you need to specify the generic key values with a maximum length of 120 bytes.
  • The table cannot be used as the base table of a lock object.