Creating a data connection definition for a database
The IO Design perspective uses an ODBC or JDBC driver to connect to a database. The preconfigured database types are:
*DB2
*Informix
*MySQL Enterprise
*Oracle
*PostgreSQL
*SQL Server
*Sybase
How to create a data connection definition for a database
1 In Navigator, select the project for which you want to create a data connection definition.
2 Choose FileNewData Connection Definition.
New Data Connection Definition appears.
3 In New Data Connection Definition:
*In Name, type the name of the database.
*In Type, choose a database type from the drop-down list.
*In Description, type a description for the database.
*In Configuration key, type the configuration key to retrieve the connection property values from the data source connection configuration file at run time.
Figure 2‑6 shows an example of creating a data connection definition for a SQL Server database.
Figure 2‑6 Creating a data connection definition for a database
*Choose Finish.
The IO Designs folder hierarchy and data connection definition file name appear in Navigator, and Data source connection properties appears. Connection property values stored in the data source connection configuration file are not displayed.
4 In Data source connection properties:
*If you did not provide a configuration key earlier, you may provide one now.
*In Credentials, choose Proxy. Type the user name and password for the database user. The IO Design perspective connects to the database using the user name and password you specify.
*In Port, type the number of the port that the IO Design perspective uses to connect to the database server.
*Provide values for the remaining properties.
The remaining properties are specific to the connection type.
Figure 2‑7 shows an example of specifying the connection properties for a SQL Server database.
Figure 2‑7 Specifying data source connection properties for a database data connection definition
*Choose Test Connection to test whether the connection properties you provided enable a successful connection to the database.
If you chose Passthrough in Credentials, a message appears informing you that you need to provide a user name and password in the data connection editor. Choose Finish. User Information appears. Type the database user name and password in User Information and choose Finish, as shown in Figure 2‑8.
Figure 2‑8 Providing user information to connect to the database
If the IO Design perspective connects to the database, a confirmation message appears. Choose OK.
*Choose one of the following:
*Map tables, to create maps of database tables and views
*Map stored procedures, to create a map of a stored procedure result set
*Create SQL map, to create a map of a query written in the database’s native SQL