Data types mapping
Data types mapping tab in the Mapping module shows how data types are connected inside of the database.
DB Best Migration Platform supports 3 types of data types mapping:
- Default mapping — the basic mapping used in Schema Comparison. Default mapping doesn’t support adding or deleting pairs, so you can only edit the Target. DB Best Migration Platform starts default mapping when the schema comparison has no mapping set (such as Columns or Arguments).
- Columns — the mapping type used in Schema Comparison for all data types in columns.
- Arguments — the mapping type used in Schema Comparison for ALL (In/Out/Return) parameters, functions/procedures.
- Local Variables & Return values — the mapping types available only in Oracle. For now, they are not involved in the DB Best Migration Platform operations.
Operations on the data types mapping
You can add, edit, reset, delete and import the mapping types.
Adding pairs
To add a new pair of datatypes to the types of mapping follow these steps:
- Click the Add button in the bottom menu (Figure 1). Note: The button can be disabled if you select the default mapping type.
Figure 1. Add button
- In the newly opened window (Figure 2) set a new pair of data types you want to map.
Figure 2. Add new mapping window
- Click the Apply button.
Edit
To edit a pair of datatypes in type mapping follow these steps:
- Click the Pencil button (Figure 3).
Figure 3. Edit button
- Edit the existing pair datatypes in the opened window.
- Click the Apply button.
Note: In the Default type of data type mapping you can edit the Target side only.
Delete
To delete a pair, click the basket button in front of the pair (Figure 4). The button is invisible for the Default type mapping.
Figure 4. Delete button
Import
DB Best Migration platform allows for importing the SSMA type mappings.
When importing, the system operates three main principles:
- Old mappings are not deleted. New mappings are added to the existing ones.
- If the new mapping duplicates already existing it won’t be added.
- Mapping gets added to Default mapping. For the pair of Oracle — MSSQL, the mapping will be added to the special mapping category (Local variable, Return values, Columns, Arguments) and not default.
To import pairs in type mapping follow these steps:
- Click the Import button in the bottom menu (Figure 5).
- In the opened window click the Select button and choose a file (*.mappings) to import.
- Click Import to finish.
Figure 5. Import button
Note: You can import only the SSMA type mappings (Oracle – MSSQL, MySQL – MSSQL, Sybase ASE – MSSQL). If the Select button is disabled, the Conversion System is not SSMA.
Reset
To reset the mapping of the data types, click the Reset button (Figure 6).
Note: You cannot roll back this operation.
Figure 6. Reset button
Example type pairs
For example, we have two columns with datatype Char(100).
If the mapping type doesn’t contain a pair having Char(100) at Source and Target, then the Schema Comparison will show data type not equal.
Examples of valid pairs:
- Char(1..300) – Char(1…200)
- Char(100) – Char(1…200)
- Char(1…100) – Char(100)
- Char(100) – Char(100)
Examples of the invalid pairs:
- Char(1..300) – Char(101…200)
- Char(99) – Char(1…200)
- Char(100) – Char(85)
Note: DB Best migration platform considers the data types with parameters such as Length/Precision/Scale and without the parameters to be different data types.
Example:
Char is not equal to Char(Length).
Didn’t find the answer?
You can report problems, ask questions or share ideas for improvements on our email [email protected].