4.1 Defining a Data Source

To connect to other types of databases, see Configuring Data Source and Query Registries in Data Modeling.

Before you build queries or data models, you must define the data source from which data should be retrieved. The following example shows how to define a JDBC (Java Database Connectivity) data source.

In this walkthrough, you will define a new JDBC data source called 'SampleOrders'. Follow the steps below.

1. Click the 'New' button in the toolbar. This opens the 'New Asset' dialog box.

2. In the left panel of the 'New Asset' dialog box, click the 'Data Source' node on the tree.

3. In the right panel, select 'JDBC', and click 'OK'.

 

This opens the 'JDBC Data Source Wizard'.

4. Enter “SampleOrders” in the name field, and click 'Next'.

 

If you connect to your own JDBC data source, make sure that you add the vendor-specific driver JAR file(s) to the classpath. SeeConfiguring Style Studio for more infor­mation.

5. Select 'Derby Embedded' from the drop-down list for the 'JDBC Type'. The correct driver, org.apache.derby.jdbc.EmbeddedDriver, automatically appears in the 'JDBC Driver' field.

 

6. Click 'Next' to continue to the 'JDBC URL' page.

Every JDBC driver has a unique connec­tion 'JDBC URL'. You can obtain this from the database vendor.

7. In the 'JDBC URL' field, enter “jdbc:derby:classpath:orders”. This is the connection URL for the sample Derby database.

8. Deselect the 'Requires Login' option. (Otherwise you will be prompted for a username and password.)

 

9. Click 'Finish' to display the final Data Source definition page.

 

After you save the data source, it will appear in the left-side Asset panel under the 'Query' node.

10. Click the 'Save' button in the toolbar to save the new data source.

11. Verify that you can connect to the database. Click the 'Test Data Source' button in the top toolbar. A message will inform you if the connection was successful.

 

<< 4 Data Modeling © 1996-2013 InetSoft Technology Corporation (v11.4) 4.2 Creating a Data Model >>