Starting the PointBase Development Database

This tutorial describes how to start the PointBase database management system so that the MedRec application can use it to store application data.

In particular, the tutorial shows how to:

Note: The installation of PointBase shipped with WebLogic Server is already set up with the database tables and data used by the MedRec application. For information on viewing the already-created tables, see Step 2: Use the PointBase console to view the MedRec tables and data.

The tutorial includes the following sections:

Prerequisites

Before starting this tutorial, create the MedRec domain and MedRec server instance. See Tutorial 1: Creating a WebLogic Domain and Server Instance for Development.

Procedure

Follow these steps to start and use PointBase:

Step 1: Start the PointBase database.

  1. Open a command prompt window.

  2. Change to the PointBase tools directory:
    cd c:\bea\weblogic81\common\eval\pointbase\tools
    
    

  3. Start the PointBase database by executing the following command:
    startPointBase.cmd
    
    

  4. Leave this command window open for as long as you want the PointBase database running. If you close the window, the PointBase database will shut down.

Step 2: Use the PointBase console to view the MedRec tables and data.

The installation of PointBase shipped with WebLogic Server is already set up with the database tables and data used by the MedRec application. To view these already-created tables, use the PointBase Console.

Note: You must start the PointBase database before you can start the PointBase console. See Step 1: Start the PointBase database.

  1. Launch the PointBase console:

    From the Start menu:

    Start - >Programs - >BEA WebLogic Platform 8.1 - >Examples - >WebLogic Server Examples - >PointBase Console

    From a script:

    1. In a command-line shell, go to the bea_home\weblogic81\common\eval\pointbase\tools directory where bea_home is the main BEA home directory, typically c:\bea. For example, enter the following command:
      cd c:\bea\weblogic81\common\eval\pointbase\tools
      
      

    2. Invoke the startPointBaseConsole.cmd command to launch the PointBase console:
      startPointBaseConsole.cmd
      
      

      This command also sets the CLASSPATH to find the PointBase JAR files.

  2. In the Driver field, enter com.pointbase.jdbc.jdbcUniversalDriver.

  3. In the URL field, enter jdbc:pointbase:server://localhost/demo.

  4. In the User field, enter MedRec.

  5. In the Password field, enter MedRec.

  6. Click OK.

  7. In the left pane, expand Schemas - >MedRec.

  8. Browse the tables, triggers, views, and procedures that make up the MedRec database.

Best Practices

Use the scripts in the PointBase tools directory to start the database and invoke its console. See:

c:\bea\weblogic81\common\eval\pointbase\tools

The Big Picture

The MedRec application uses the PointBase database management system:

Patient, Physician, and Administrator Data

The MedRec application uses container-managed entity EJBs to automatically persist information about patients, physicians, and administrators in the PointBase database. The following table lists these entity EJBs and the PointBase tables in which the information is persisted.

Table 1: Relationship Between MedRec Entity EJBs and PointBase Tables

Entity EJB

Application That Uses the EJB

Corresponding PointBase Table

Description

AdminEJB

Administration

ADMIN

Information about the administrators that manage the workflow of the MedRec application. Administrators handle patient requests.

AddressEJB

Administration, Patient

ADDRESS

Used by the PATIENT, PHYSICIAN, and ADMIN tables to store their respective addresses.

PatientEJB

Administration, Patient

PATIENT

Information about patients, such as name, address reference to the ADDRESS table, SSN, and so on.

PhysicianEJB

Administration

PHYSICIAN

Information about physicians, such as name, address reference to the ADDRESS table, phone, and email.

PrescriptionEJB

Patient

PRESCRIPTION

Describes a prescription, such as the prescribed drug, the dosage, frequency, instructions, and so on. Also includes the patient ID, the ID of the prescribing physician, and the particular visit that instigated the prescription.

RecordEJB

Patient

RECORD

Describes a single patient visit to a physician. Includes the patient ID, the physician ID, the date, the symptoms, diagnosis, and the vital signs of the patient.

UserEJB

Administration, Patient, Physician

USER

Lists all users (patients, physicians, and administrators) who are authorized to log into the MedRec application. After a user is authenticated, the application retrieves additional information from the appropriate table (PATIENT, PHYSICIAN, OR ADMIN).

VitalSignsEJB

Patient

VITALSIGNS

Describes the vital signs of a patient for a particular visit. Vital signs include temperature, blood pressure, height, weight, and so on.

Persistent JMS Message Storage

The MedRec application uses persistent JMS messaging, which means that any JMS messages that are put in a queue are also stored in a database so that the messages can be retrieved in case a problem occurs (such as a server crash) before the message-driven bean is able to process them. The messages are stored in the following two PointBase tables:

These tables are generated automatically when you create the JMS JDBC store using the Administration Console and are used internally by JMS.

Related Reading

 Back to Top Previous Next