Attributes of entity types

Attributes define the possible properties for entities of an entity type.

Attribute type

The attribute type describes the function of an attribute (for example, whether an attribute is a key attribute).

Defining attributes

Attributes are either assigned directly to an entity type or transferred from the ABAP/4 Dictionary.

Attributes that are assigned directly obtain their semantic and technical characteristics from a data element which is assigned to the attribute. Since the Data Modeler and the ABAP/4 Dictionary use the same data elements, data elements defined in the Data Modeler can be used later in the ABAP/4 Dictionary and vice versa.

Attributes are transferred from the ABAP/4 Dictionary by assigning a table or view to an entity type. The fields of the table or view are transferred to the entity type as attributes and receive their semantic and technical characteristics from the data elements of the fields. Attributes transferred from the table or view are flagged in the Data Modeler. Assigning a view or table to an entity type establishes the connection between the Data Modeler and the ABAP/4 Dictionary. In specializations the attributes inherited from the generalization can also be displayed (see Specializations/generalizations).

Dictionary assignment

Assigning a table:

An entity type is mapped to exactly one table in the ABAP/4 Dictionary. The fields of the table are transferred to the entity type as attributes and are included in the attribute display.

Assigning a view:

The entity type is mapped to one or more tables of the ABAP/4 Dictionary using a view. Here is a list of instances where it is advisable to assign a view:

  1. The information, which from a modeling perspective is distributed over a number of different entity types, is contained in a single table:

    Consequently, the table contains fields which are not attributes of the entity type. Projection on the required fields produces a view containing only those fields corresponding to the attributes of the entity type. The table also contains entries for other entity types. These are suppressed by means of selection.

    You have modeled the entity types Employee and Company car owner. The Dictionary contains only one table which has all the attributes. To resolve this problem, a view is assigned to the entity types involved by means of selection and projection.

  2. The attributes of an entity type are distributed over several tables:

    You can use a view to bring together the fields from the tables involved. The result is a virtual table which shows precisely those fields that correspond to the attributes of the entity type.

    You have modeled the entity type Courses at the university with the attributes Faculty, Course number, Course title, and Course description. In the ABAP/4 Dictionary, the attributes are distributed over the tables UKURS and UKRSB (because courses are held in several languages).

  3. View assigned to a specialization:

When a specialization of an entity type is created, the attributes of the generalization are passed on to it. This also applies to a view that is assigned to a specialization. When such a view is created, it inherits all tables, fields, and selection conditions of the view or table assigned to the generalization.

It is now possible to add more fields and tables to the view, since a specialization has more characteristics. The selection condition can also be tightened up so that only the entities belonging to the specialization are selected.

If, at a later time, the view assigned to the generalization is changed, the changes can, if required, be passed on to the views of the specializations. This does not happen automatically, since minor changes made to the model could have extensive repercussions for views in operational use.

If requested, attributes of the generalization are passed on to the specialization during view maintenance. If a view is assigned to an entity type, a check is made to see whether a generalization exists for the entity type. If so, the attributes of the generalization, which are defined by means of ABAP/4 Dictionary assignment (of a table or view) are transferred to the view of the specialization.

Other subjects:

Data Modeler: overview

Entity types

Relationships

Specializations/generalizations

Structural concept: data model and data model hierarchy

Top-down and bottom-up modeling

Consistency checks