Generate the tutorial database schema

The tutorial application uses three database tables to store each employee's information: EMPLOYEE, ADDRESS and PHONE. Table: Tutorial Database Schema describes the columns for each table.

You can download SQL scripts to build and populate the database tables with sample data from http://www.eclipse.org/webtools/dali/docs/dbscripts.zip.

Tutorial Database Schema

Table Column Type Details

EMPLOYEE

EMP_ID

NUMBER(15)

Primary Key

F_NAME

VARCHAR(40)


L_NAME

VARCHAR(40)


ADDR_ID

NUMBER(15)

Foreign Key, references ADDRESS.ADDRES_ID

VERSION

NUMBER(15)


ADDRESS

ADDRESS_ID

NUMBER(15)

Primary Key

PROVINCE

VARCHAR(80)


COUNTRY

VARCHAR(80)


STREET

VARCHAR(80)


P_CODE

VARCHAR(20)


CITY

VARCHAR(80)


PHONE

EMP_ID

NUMBER(15)

Foreign Key, reference to EMPLOYEE.EMP_ID

AREA_CODE

VARCHAR(3)


P_NUMBER

VARCHAR(7)

Primary key

TYPE

VARCHAR(15)



Next, you will Create a database connection.