Chapter 12 Creating Mappings


Creating a data source

You can create a data source in any of the following ways:

The Data Source Creation Wizard allows you to create a data source in your model. It opens automatically when no data source is defined for the model either when you open the Mapping Editor or when you create a mapping from the Mapping tab of an object's property sheet.

You can create additional data sources at any time.

From the Mapping Editor, the Data Source Creation Wizard automatically creates default mappings between source and target objects with the same name. If you do not want the wizard to create these default mappings, you have to deselect the Create default mappings check box on the Options page. Note that you cannot create default mappings between source and target objects with the same name when you open the Data Source Creation Wizard from the Mapping tab of an object property sheet.

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

  1. On the Data Source Identification page, enter a name for the data source, and then specify an access type. The selected type controls which types of queries (for PDM data sources) are available in the Mappings pane, and the existence of forward and reverse mappings. You can choose between:

  2. [If required] Select the type of the model you want to use as schema for the data source.
  3. Click Next to go to the Source Model Selection page.
  4. Select one or more models from the list of open models in the workspace
  5. Click Next to go to the Options page and clear the Create default mappings check box if you do not want to create default mappings between source and target objects with the same name then click Finish.

    or

    Click Finish if you want to create default mappings.

    The wizard closes and the data source is created in the Source pane of the Mapping Editor. The models you have selected are displayed beneath showing default mappings if any. If you need to create other data sources, you can click the Create Data Source tool in the Source pane toolbar. For more information about the Mapping Editor interface, see Understanding the Mapping Editor interface.

You can add additional models to a data source.

Steps To add additional models to a data source:

  1. From the Mapping Editor, click the Add Model to Selected Data Source tool, select a model from the selection box, and then click OK.

    If the data source is a PDM, you can click the Database Connection tab to define parameters to connect to a database. See Data source properties.

You can create additional data sources.

Steps To create additional data sources:

  1. From the Mapping Editor, click the Create Data Source tool to launch the Data Source Creation Wizard.

 


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