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.

Steps To create a mapping for an object:

  1. Double-click an object to display its property sheet, then click the Mapping tab.
  2. 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.
  3. Click the Add Objects tool to select more source object to map with the target object and click OK.
  4. Click the Attributes Mapping sub-tab and click the Add Mapping tool in the toolbar.

    Note   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.

  5. 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.
  6. 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.
  7. [If required] Click the Operations Mapping sub-tab
  8. [If required] Click the Criteria sub-tab if you want to specify join criteria between the source objects.
  9. [If required] Select the different queries sub-tabs to visualize or modify the SQL statements.
  10. Click OK.

 


Copyright (C) 2008. Sybase Inc. All rights reserved.