Types of Mapping in DBMS

Mapping in DBMS:

We already know that three view-levels are defined by means of three schemas. These schemas are stored in the data dictionary. In DBMS, each user refers only to its external schema. Hence, the DBMS must transform a request on a specified external schema into a request against the conceptual schema. Then into a request against an internal schema to store and retrieves data to and from the database.

The process to convert a request (from an external level) and the result between view levels is called mapping. The mapping defines the correspondence between three view levels. The mapping description is also stored in the data dictionary.

Types of Mapping:

The DBMS is responsible for mapping between these three types of schemas. There are two types of mapping:

  • External-Conceptual Mapping
  • Conceptaul-Internal Mapping

External-Conceptual Mapping:

It defines the correspondence between a particular external view and the conceptual view. The external conceptual mapping tells the DBMS which objects on the conceptual level correspond to the objects requested on a particular user’s external view. If changes are made to either an external view or conceptual view, then mapping must be changed accordingly.

Conceptaul-Internal Mapping:

It defines the correspondence between a conceptual view and the internal view. The database is stored on the physical storage device. It describes how conceptual records are stored and retrieved to and from the storage device. This means that conceptual-internal mapping tells the DBMS how the conceptual records are physically represented. If the structure of the stored database is changed, then the mapping must be changed accordingly. It is the responsibility of DBA to manage such changes.

Data model mapping is also called logical database design. During this phase, the transformation of the conceptual schema into the actual implementation of the database is done. This may be carried out as a DBBMS package commercially available. In terms of the three-level DBMS architecture, the result of this phase is a conceptual schema in the chosen data model. In addition, the design of external schema for specific applications is often done during this phase.