Connecting databases to a knowledge model

Purpose

To connect a database to the Schengen Without Behaviour knowledge model.

Theory

This exercise teaches you how to connect a database to an existing knowledge model. The relationship between a database source and a knowledge model is defined by a logical name. Logical names are found in the configuration file for the Erudine Behaviour Engine. This file is named erudine.config and is located in the Erudine root directory, as specified during installation.

The configuration file contains details of all the databases that are linked to the knowledge model.

In the above example, the logical name of the database is borderdemo.

Logical names are used to define the connection settings to any external databases, such as MySQL, Oracle etc., and are displayed in the Database Properties screen of the Erudine Behaviour Engine, enabling you to select them if required.

In this exercise, you will create a new knowledge model and connect to an Apache Derby database.

In addition to this database type, you can also connect to the following databases:

Database Version Database Type
Apache Derby 10.2.2.0 Derby
DB2 UDB 9.1.200.166 DB2
Microsoft SQL Server 2005 SQLServer
MySQL (Unix) (64-bit) 5.0.27 MySQL
MySQL (Windows) 5.0.27 MySQL
Oracle 10g Release 2 (10.2) Oracle

More information on database logical names can be obtained from the Administration of the Erudine Behaviour Engine Training Guide.

Actions

To connect a database:

  1. Click the New Model button, to display a blank knowledge model screen.
  2. Right click in a blank space on the Knowledge Model screen and select Database > Read-only Database from the context menu.
  3. In the Create 'Read-only Database' dialog box, type Entrant in the Name box and click OK.

    A new node called Entrant is created.
  4. Right click on the Entrant node and select Database Connection Properties from the context menu, to display the Database Properties pane.
  5. Click the Minimise Down button in the top left corner of the knowledge model, to minimise it.
  6. Select borderdemo from the Database drop-down list.
  7. Select entrant from the Table drop-down list.
    The conceptual graph for the entrant table is displayed.
  8. Type Entrant in the Graph Defining Concept box.
    Note
    This text is case sensitive and the conceptual graph contains concepts called both entrant and Entrant.

    Notice that as you type, the text in the concept at the top of the conceptual graph changes. As you finish typing Entrant, the conceptual graph is reorganised so that all the other concepts are defined by their relationship to the Entrant concept.

    Note
    If you do not enter a value in this box, then the table name is used automatically and the conceptual graph remains unchanged.
  9. Type Forename in the Descriptive Name for Situation box.
    Note
    This text is case sensitive and must be identical to the name of a concept as shown in the conceptual graph.

    This defines that when you display the Entrant node in the Conclusion & Justification screen, data from the Forename concept is displayed in the Description column of the Situation List. The primary key value for each situation is displayed in the Id column.
  10. Ensure all four Import check boxes are selected, to import all the columns from the database table.
  11. Click the Knowledge Model Button.
    The new Entrant node now contains a specific number of situations (cases), which is shown in the bottom right corner of the knowledge node.
  12. Right click in a blank space on the Knowledge Model screen and select Process > Enrich Node from the context menu.
  13. In the Create Enrich Node dialog box, type Enrich Entrants in the Name box and click OK.
    A new node called Enrich Entrants is created.
  14. Right click on the Entrant node and select Link To from the context menu.
    The Link To dialog box is displayed.
  15. Select Enrich Entrants from the list of knowledge nodes and click the Link button.
    This means that data will be sent from the Entrant database node to the Enrich Entrants node.
    A line now appears between the two knowledge nodes to show that a link has been established.
  16. Double click on the Enrich Entrants node to view the data that has been transferred.
  17. Close the knowledge model without saving changes.

Platform: all
EBE Version: 2.4
Category: Introduction Guide
Author: Patrick Peisker


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Activity
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content