Data Sources

Top   « Previous  Next »

 

Connect to a database

 

 

To connect to a database, enter the details of the database connection in the New Connection screen.

 

For this example we'll use the Microsoft Northwind database. Please see Creating an ODBC System Data Source Name (DSN) to connect to the Northwind database.

 

The connection fields should be completed as follows:

 

Name: northwind

Driver: JDBC:ODBC Bridge

URL: jdbc:odbc:northwind

Username and Password can be left blank for the Northwind database.

 

 

Note: If you were to use a different database type, the url is formatted differently for each driver, eg:

 

MySQL

Driver: org.gjt.mm.mysql.Driver (already supplied in driver settings)

URL Format: jdbc:mysql://[host]:[port]/[database]

eg: jdbc:mysql://192.168.1.189:3306/business

 

After entering the database connection details, click the Save button.

 

Data Sources - Add Database

 

After saving the connection, the database tree shows the database name in the tree. In the main work area a list of tables and fields in that database is shown. These details are only to show the database details and are not able to be edited.

 

Data Sources - Connection

 

Expand the tree by clicking on the + expander

 

This now shows Connection and Views. Click on the tree expander next to Views.

 

Click on Add View

 

 

Creating a View

 

Views are a subset of a database. When a database has many tables and fields, it's helpful to create a View so you only deal with a small part of the total data.

 

Lets create a View of the data which contains details about customers

 

Enter the View Name as 'Customers' and write a short description.

 

Tick the tick boxes for each table or field to include in this view, in this case we'll tick the Customers table, although we could only tick the fields we want to use.

 

Data Sources - Add View

 

The Field View shows details of each field. You can enter a description of each field if you choose and change the display name of the field to something more user friendly if the field name might not be easily understood by end users.

 

Click Save View to save the view.

 

Add other Views for different data if you want.