Chapter 15 The Mapping Editor


Creating a data source in the Mapping Editor

By default, you are prompted to create a data source the first time you open the Mapping Editor. The data source contains one or more models from which data will be extracted.

Data source access type

A data source can have the following access types that determine the direction of the data flow between the Source and the Target panes:

The selected access type influences the number of available queries in the Mappings pane and the existence of reverse and direct mappings:

Data source access type Query display
Read/Write Criteria, Select, Insert, Update and Delete.
Read-only Criteria and Select (no reverse mapping).
Write-only Criteria, Insert, Update and Delete (no direct mapping).

Query display only applies to PDM data sources.

You cannot create direct mappings from a data source with Write-only access type, only reverse mappings are authorized. In the same way, you cannot create reverse mappings from a data source with a Read-only access type, only direct mappings are authorized.

Conversely, data sources with a Write-only access type are not displayed in direct mapping (Source > Target) and data sources with a Read-only access type are not displayed in reverse mapping (Target > Source).

For more information about direct and reverse mappings, see the "Understanding the Mapping Editor Dialog Box" section.

The Data Source Creation Wizard guides you through the following operations:

Using the Create Data Source tool

Once you have created your data source, you can create others, using the Create Data Source tool in the Source pane toolbar. This tool also launches the Data Source Creation Wizard.

Steps To create a data source in the Mapping Editor using the Data Source Creation Wizard:

  1. In the Data Source Identification page, type a name for the data source in the Data source box.
  2. Select an access type from the Access type list to indicate how you want to access the data source.

    You can select among the following access types: Read/write, Read -only, Write-only. The selected type influences the number of available queries in the Mappings pane and the existence of direct and reverse mappings.
  3. (XSM only) Select the type of the model you want to use as schema for the data source
  4. Click Next.
  5. In the Source Model Selection page, select one or more models among the list of open models in the workspace to declare source models.
  6. Click Finish.

    The data source is created in the Source pane and the models you have selected are displayed beneath. If you need to create other data sources, you have to click the Create Data Source tool in the Source pane toolbar.

Add Model tool

The Add Model to Selected Data Source tool allows you to add source models from a selection list to an existing data source.

 


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