Skip Headers

Oracle9i Application Server Application Developer's Guide
Release 2 (9.0.2)

Part Number A95101-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

2
The Sample Application

This chapter describes the sample application, "Employee Benefit Application", used in this guide.

Contents of this chapter:

2.1 Requirements for the Sample Application

The Employee Benefit application enables users to view employee information (such as first name, last name, email, and phone number), and add and remove benefits. A typical user of the application is an employee who manages benefits for other employees in a company.

The functional requirements for the sample application are:

Miscellaneous:

Clients for the application:

2.2 Screenshots of the Sample Application

When the user invokes the application, the first page prompts the user to enter an employee ID (Figure 2-1).

When the user clicks the Query Employee button, the application queries the database for the specified employee ID. If found, the application displays information for that employee, including which benefits the employee has currently elected (Figure 2-1).

If the employee ID does not match an employee, the application displays an error page (Figure 2-3).

On the Info page, the user can add or remove benefits by selecting the Add or Remove Benefit link. The application then displays the Add or Remove Benefits page (Figure 2-2). The user selects which benefits to add or remove, and clicks the Add Selected Benefits or Remove Selected Benefits button. If successful, the application displays the Success page, and the user can click the "Query the Same Employee" link to see the updated benefits.

For screen shots of the application running on a wireless device, see Chapter 7, "Supporting Wireless Clients".

Figure 2-1 ID page and Info page

Text description of da_screa.gif follows

Text description of the illustration da_screa.gif

Figure 2-2 Add Benefits Page, Remove Benefits Page, and Success Page

Text description of da_scre2.gif follows

Text description of the illustration da_scre2.gif

Figure 2-3 Error page

Text description of errorpag.jpg follows.

Text description of the illustration errorpag.jpg

2.3 Database Schema

The Employee Benefit sample application uses the common hr schema that comes with Oracle9i database and Oracle9iAS Metadata Repository. The application uses the hr.employees table, plus two additional tables (benefits and employee_benefit_items) that you install. You install these tables in the default tablespace of the hr schema.

Table 2-1 Tables in the hr schema
Table name Description

employees

Contains fields such as: employee_id, first_name, last_name, phone, email, and department.

benefits

Contains fields such as benefit_id, benefit_name, and benefit_description.

employee_benefit_items

Maps employees with benefits. The table has fields such as employee_id, employee_id, and election_date. An employee can have multiple benefits. This is the table that the application updates when employees update their benefit elections.

The application retrieves data from all three tables, but updates only the employee_benefit_items table.

Figure 2-4 Database schema

Text description of da_scre4.gif follows

Text description of the illustration da_scre4.gif


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index