Before You Begin |
![]() Previous |
![]() Next |
This section contains important information on installing and configuring your tutorial environment. You should read this section before starting the tutorial.
Prerequisites
To complete this tutorial, ensure that you have the following software installed and properly configured:
Oracle TopLink Workbench 10.1.3.1
http://www.oracle.com/technology/products/ias/toplink/index.html
A relational database. This tutorial uses Oracle Database 10g Express Edition that can be obtained from:
http://www.oracle.com/technology/products/database/xe/index.html
A Java IDE. This tutorial uses Eclipse 3.2 that can be obtained from:
http://www.eclipse.org/
Refer to the Oracle Toplink Developer's Guide for complete information on using TopLink
To complete the tutorial project, you will need to download the tutorial source files. These files contain the Java classes used to build the project and the SQL scripts to create the database.
Unzip the Advanced_Tutorial to your <ADVANCED_TUTORIAL_HOME> directory.
The src folder contains the Java source files.
The mw folder is empty – use it to store your TopLink Workbench project.
The sql folder contains the SQL script to create and populate the database.
In this tutorial, you will connect to a relational database. This tutorial includes information on using Oracle Express Edition.
Download and install Oracle Database 10g Express Edition:
http://www.oracle.com/technology/products/database/xe/index.html
Create a new user, scott (password = tiger), with full create privileges.
Login as user scott and execute the createTables.sql and populateTables.sql SQL scripts to create and populate the database. The following table describes the database structure:
| Table | Column | Description |
|---|---|---|
| ADDRESS | ADDRESS_ID | NUMBER(15,0), Primary key |
| CITY | VARCHAR2(80) | |
| COUNTRY | VARCHAR2(80) | |
| P_CODE | VARCHAR2(80) | |
| PROVINCE | VARCHAR2(80) | |
| STREET | VARCHAR2(80) | |
| EMPLOYEE | ADD_ID | NUMBER(15,0), Foreign key relationship to ADDRESS.ADDRESS_ID |
| EMP_ID | NUMBER(15,0), Primary key | |
| F_NAME | VARCHAR2(40) | |
| L_NAME | VARCHAR2(40) | |
| VERSION | NUMBER(15,0) | |
| ADDR_ID | NUMERIC(15), Foreign key reference to ADDRESS.ADDRESS_ID | |
| EMP_ID | NUMERIC(15), Primary key
Foreign key reference to SALARY.EMP_ID |
|
| END_DATE | DATE | |
| END_TIME | TIME | |
| F_NAME | VARCHAR(40) | |
| GENDER | CHAR(1) | |
| L_NAME | VARCHAR(40) | |
| MANAGER_ID | NUMERIC(15), Foreign key reference to EMPLOYEE.EMP_ID | |
| START_DATE | DATE | |
| START_TIME | TIME | |
| VERSION | NUMERIC(15) | |
| LPROJECT | BUDGET | NUMERIC(10,2) |
| MILESTONE | DATE | |
| PROJ_ID | NUMERIC(15), Primary key | |
| BUDGET | NUMERIC(10,2) | |
| PHONE | AREA_CODE | VARCHAR2(3) |
| EMP_ID | NUMBER(15,0), Primary key | |
| P_NUMBER | VARCHAR2(7) | |
| TYPE | VARCHAR2(15) | |
| PROJ_EMP | EMP_ID | NUMERIC(15), Primary key
Foreign key reference to EMPLOYEE.EMP_ID |
| PROJ_ID | NUMERIC(15), Primary key
Foreign key reference to PROJECT.PROJ_ID |
|
| PROJECT | DESCRIP | VARCHAR(200) |
| LEADER_ID | NUMERIC(15), Foreign key reference to EMPLOYEE.EMP_ID | |
| PROJ_ID | NUMERIC(15), Primary key | |
| PROJ_NAME | VARCHAR(30) | |
| PROJ_TYPE | CHAR(1) | |
| VERSION | NUMERIC(15) | |
| SEQUENCE | SEQ_COUNT | NUMBER(38,0) |
| SEQ_NAME | VARCHAR2(50) |