Before you start
In this tutorial learn how to use the discovery component of Rational Data Architect to semi-automatically create mappings between relational and XML data sources. This tutorial is the third in a series about Rational Data Architect.
This tutorial shows you, step by step, how to:
- Invoke the Rational Data Architect (RDA) lexical similarity discovery algorithm to discover potential schema mappings based on the similarity of column names.
- Define a glossary model that contains words, abbreviations, and synonyms using the RDA Glossary Model editor.
- Use the glossary model information with the semantic name algorithm to discover additional matches.
- Set up relationship discovery to use data samples.
- Find potential mappings with algorithms that use data samples.
After taking this tutorial, you should be able to use the Rational Data Architect discovery component to find potential schema mappings.
This tutorial assumes familiarity with relational databases, preferably DB2®. Familiarity with the Rational Data Architect Mapping Editor is beneficial, but not required. For reference, consult these developerWorks articles:
- Part 1: Access and integrate enterprise metadata with Rational Data Architect
- Part 2: Generate SQL/XML queries with Rational Data Architect
- Use Rational Data Architect to integrate data sources
To execute the steps described in this tutorial, you need to have Rational Data Architect V7 and IBM DB2® Enterprise 9 installed. You can download trial versions of IBM Rational Data Architect V7 and DB2 V9.1 (see Resources).
- Install DB2 V9.1..
- Install Rational Data Architect V7.
- Unzip the package, ar-rdamapcode.zip from the file into a folder (for example, C:\RDA_Tutorials). This step creates the RDA_Discovery folder.
- Start Rational Data Architect and specify the folder where you unpacked the package as the location for your workspace (for example, C:\RDA_Tutorials).
- The RDA_Discovery folder in the package is a Rational Data Architect data project folder. In Rational Data Architect you have to import it into your workspace. From the File menu, select Import.
- Select the Existing Project into Workspace wizard.
Figure 1. Import wizard selection
- Click Next. Browse to the location where you extracted ar-rdamapcode.zip (for example, C:\RDA_Tutorials).
Figure 2. Import Project wizard
- Click Finish. As a result, you see the RDA_Discovery project with a set of data models, a glossary model, and mapping models files in your workspace as shown in Figure 3. (If you don't see the Database Explorer, make sure that you are in the Data perspective, shown in Figure 4.)
Figure 3. Data Project Explorer after project import
Figure 4. Data perspective
- Some of the relationship discovery algorithms require sample data. The script file rda_discovery_db.sql creates a DB2 database LIBRARY and inserts a set of sample data. To deploy the script in your DB2 database, start the DB2 command window (Windows menu Start > IBM DB2 > Command Line Tools > Command Window).
- Go to the RDA_Discovery folder that you extracted from ar-rdamapcode.zip.
- To create the database LIBRARY, define primary and foreign keys, and insert sample data, run this command:
db2 -tvf rda_discovery_db.sql
Figure 5. Creating LIBRARY database
- To create the database
OLD_LIB, define primary and foreign keys, and insert sample data, run the command:
db2 -tvf rda_discovery_db_old.sql
- Connect to the database LIBRARY in Rational Data Architect. In the Database Explorer, right-click Connection and select New Connection. (If you don't see the Database Explorer, make sure that you are in the Data perspective, shown in Figure 4.)
Figure 6. Creating new database connection
- Specify the connection information according to your environment, similar to Figure 7.
Figure 7. Database connection settings
- Click Test Connection to check whether all parameters are set correctly. If the test is successful, click Finish.
- Repeat steps 13 to 15 for the database OLD_LIB using the same connection settings except for the database name.





