Chapter 15 The Mapping Editor
When you create a mapping, it is displayed in the Mapping list in the lower part of the Mapping Editor dialog box, called the Mappings pane.
The Mappings pane content changes automatically depending on the object you select in the Target pane:
Selected object | Mappings pane displays... |
---|---|
Folder, model or package | A summary of the mappings it contains. |
Parent object (table, view, class, element, complex type, dimension, fact, cube) | The same content as the Mapping tab in the object property sheet: Sources of the mapped object, mappings of its child objects if any, criteria, and SQL queries to execute the mapping. |
Child object (table column, view column, class attribute, operation, association, element attribute, complex type attribute, dimension attribute, fact measure) | The same content as the object mapping property sheet ("Mapped to" expression and the sources of the child, which are PDM, OOM or XML source objects for the target object). |
You can create several different mappings for a single target object. Also, the same target object can have several sources. In the following illustration the SALE class has two different mappings Mapping_5 and Mapping_6. Also Mapping-6 has two sources: CITY and SALE.
All the mappings for a selected object in the Target pane are displayed in the Mapping list located in the lower part of the Mapping Editor dialog box. You can select one and modify it using:
The following tools help you manage mappings for a data source in the Mappings pane:
Tool | Name | Description |
---|---|---|
![]() |
Create Mapping | Creates a mapping for a data source that you can further define using the queries sub-tabs located at the bottom part of the dialog box. You are prompted to select a source object from a selection list. If child objects match, they are automatically mapped. |
![]() |
Delete Current Mapping | Deletes the current mapping for the data source. The link that materializes the mapping between the Source and the Target panes is also deleted. |
![]() |
Properties | Opens the property sheet of the current mapping. |
You have a parent target but you do not know its sources yet. You create a mapping using the Create Mapping tool. The mapping object can be compared to a container for the parent target object and its source objects. A selection dialog box opens to let you select one or more sources for your parent target that is then displayed in the Parent Object Sources sub-tab in the Mappings pane.
Then you have to select the child objects (source and target) to map using the Child Object column for the target and the Mapped to column for the source in the Child Object mapping sub-tab.
Then you can configure SQL queries using the Criteria, Select, Insert, Update and Delete sub-tab, as a mapping consists in performing modifications in the data source using SQL.
Copyright (C) 2006. Sybase Inc. All rights reserved. |
![]() |