Chapter 12 Creating Mappings
Creating a mapping for an object
You generally map objects and further define the mapping by associating their sub-objects. For more information about objects and sub-objects, see the table in the Introduction to Model Object Mapping section.
To create a mapping for an object:
- Double-click an object to display its property sheet, then click the Mapping tab.
- Click the Create Mapping tool beside the Mapping list to create a mapping for the target object. If several data sources are available, you have to select one or several data sources in the selection list and click OK. If no data source is available, the Data Source Creation Wizard opens and allows you to specify a name, an access type and a model type (if required) for the source from which you will draw your data. Click Next and select one or more models from the list then click Finish.
The Select an object dialog box opens to let you select a source object , then click OK. The name and code of the object are displayed in the Object Sources sub-tab and a mapping is created in the Mapping list.
- Click the Add Objects tool to select more source object to map with the target object and click OK.
- Click the Attributes Mapping sub-tab and click the Add Mapping tool in the toolbar.
Generate mapping
You can click the Generate Mapping tool to automatically create the mapping between sub-objects with identical name or code in the data source and the target model.
- Select the attributes that will be mapped to sub-objects in the source objects and click OK.
The selected objects appear in the Attribute column of the list.
- Click the down arrow in the "Mapped to" column to select the sub-object in the data source object with which the selected sub-object will be mapped.
You have to repeat this operation for each sub-object you want to map with the data source.
- [If required] Click the Operations Mapping sub-tab
- [If required] Click the Criteria sub-tab if you want to specify join criteria between the source objects.
- [If required] Select the different queries sub-tabs to visualize or modify the SQL statements.
- Click OK.
Copyright (C) 2008. Sybase Inc. All rights reserved.
|
|