Style Intelligence provides a built-in module, called the Data Modeler, for connecting to data sources,
designing queries, and defining semantic layers (logical models). Traditional query builders support only
relational databases, but the Data Modeler supports multiple data source types, including XML, JDBC,
EJB, text, and dozens more.
Queries are stored independent of reports in a separate XML file. Queries and data models each have their own
advantages, and often complement each other. However, a data model often provides the easiest way to expose
business data contained in relational databases, and offers maximum flexibility for end-user self-service.
This section walks you through the basics of defining a data source and creating a data model. For more
detailed information on these topics, please refer to the Data Modeler Guide.
Defining a Data Source
Prior to building queries or data models, you must define the data source from which data should be
retrieved. The following example illustrates the steps to define a JDBC (Java Database Connectivity) data
source. To connect to other types of databases, please refer to Configuring Data Source and Query Registries
in the Data Modeler Guide.
Note that the data source ‘Orders’ used in later examples is predefined in the default
installation, so we cannot define it here. However, the data source that we define in this example,
‘SampleOrders’, will illustrate the process.
- Launch the Data Modeler from the Windows ‘Start’ menu: Start → All Programs → Style
Intelligence → Data Modeler.
- Click the ‘New Data Source’ button in the top toolbar of the Data Modeler.
- Enter “SampleOrders” for the name and select ‘jdbc’ from the dropdown list. Click
‘OK’.
- Select ‘Derby Embedded’ from the drop-down list for the ‘JDBC Type’. The correct
driver, org.apache.derby.jdbc.EmbeddedDriver, should appear in the ‘JDBC Driver’ field.
- Note: The classpath is a list of the folders and JAR files that the JVM uses to locate Java programs. If
you connect to your own JDBC data source, make sure that you add the vendor- specific driver JAR file(s)
to the classpath.
- Click ‘Next’ to continue to the ‘JDBC URL’ page.
- In the ‘JDBC URL’ field, enter “jdbc:derby:classpath:orders” for the example Derby
database.
- Note: Every JDBC driver has a unique connection ‘JDBC URL’. You can obtain this from your
database vendor. The Data Modeler will save the settings that you enter regardless of whether it locates
the JDBC driver.
- Leave the ‘User’ and the ‘Password’ fields empty, and click ‘Finish’.
- In the ‘Data Source’ pane, make sure to deselect the ‘Requires Login’ option,
otherwise you will be prompted for a username and password.
- To verify that you can connect to the database using the JDBC driver, click the ‘Test Data
Source’ button in the top toolbar of the Data Modeler. A message will inform you if the connection was
successful.