Entering content frame

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

Use

The SAP implementation of the JDO standard uses a relational database as a store for the persistent data. The data in the database is organized in tables. Each persistent capable class is mapped to a table that contains a column for each persistent field of the class.

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.

This graphic is explained in the accompanying text

The tables are the same as the ones used in Getting Started with Relational Persistence. If you have already tried the relational persistence example, and have the tables deployed in the database, you can skip this step.

Procedure

...

       1.      Open the Dictionary perspective and create a new Dictionary project, such as 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:

This graphic is explained in the accompanying text

       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:

This graphic is explained in the accompanying text

       5.      Save your data.

Result

You have created the database tables TMP_DEPARTMENT and TMP_EMPLOYEE in the offline Java Dictionary.

Now you have to create the Web project for the application.

 

Leaving content frame