Show TOC Start of Content Area

Procedure documentation Creating the Database Tables  Locate the document in its SAP Library structure

Use

The data in this example is stored in two database tables:

·        TMP_DEPARTMENT contains data describing the properties of the departments

·        TMP_EMPLOYEE describes the individual employees.

Note

The tables are the same as the ones used in Getting Started with JDO. If you have already tried the JDO example, you can re-use the Java Dictionary project in this example.

 

Procedure

       1.      Open the Dictionary perspective and create a new Dictionary project – for example, GettingStartedPersistenceDic. Confirm the default project language setting (American English).

       2.      Create a table called TMP_EMPLOYEE for the employee data, and a table called TMP_DEPARTMENT for the department data. For more information, see Creating Tables.

       3.      In the TMP_DEPARTMENT table add the following columns:

¡        DEPID

¡        NAME

Modify the parameters of the columns as follows:

Column Parameters for TMP_DEPARTMENT

Column Name

Key

Build-In Type

Length

Not Null

Description

DEPID

<selected>

integer

 

<selected>

Department ID

NAME

<deselected>

string

30

<selected>

Department name

 

       4.      In the TMP_EMPLOYEE table add the following columns:

¡        EMPID

¡        FIRST_NAME

¡        LAST_NAME

¡        SALARY

¡        DEPID

Modify the parameters of the columns as follows:

Column Parameters for TMP_EMPLOYEE

Column Name

Key

Build-In Type

Length

Decimals

Not Null

Description

EMPID

<selected>

integer

 

 

< selected >

Employee ID

FIRST_NAME

<deselected>

string

30

 

< selected >

First name

LAST_NAME

< deselected >

string

30

 

< selected >

Last name

SALARY

< deselected >

secimal

8

2

< selected >

Salary

DEPID

< deselected >

integer

 

 

< selected >

Department ID

 

       5.      Save your data.

 

Result

You have created the database tables TMP_DEPARTMENT and TMP_EMPLOYEE in the offline Java Dictionary. The tables do not exist in the database yet. Now you can use the database tables in the offline SQLJ checker.

Go on with creating the Web project.

 

 

End of Content Area