Home > Getting Started with Oracle... > Installing the Sample Objects
Previous |
Next |
In Oracle Application Express, users log in to a workspace. You can think of each workspace as a shared work area that separates your objects, data, and applications into a virtual private database.
Before performing any tasks in this guide, you must create the appropriate sample objects within your workspace. These sample objects are copies of the objects that are typically installed in two schemas:
Human Resources (HR)
The HR schema contains information about the employees and the facilities where they work. Each employee has an identification number, email address, job identification code, salary, and manager. Employees are assigned to a department, and each department is associated with one location that has a full address, including the street name, postal code, city, state or province, and country code.
Order Entry (OE)
The OE schema tracks product inventories and sales of a company's products, including the product identification number, the product name, the associated associates product category, product descriptions, the weight group (for shipping purposes), the warranty periods, the suppliers, the availability status, and a minimum price.
To create the objects locally in your workspace, import the OEHR Sample Objects application.
Topics:
Tip: In order to successfully import the objects associated with the OEHR Sample Objects application, your Oracle database must include Oracle Spatial. If your database instance does not include Oracle Spatial, you can install it using Database Configuration Assistant. To learn more, see the Oracle Application Express Installation Guide for your operating environment. |
To import the OEHR Sample Objects application, you must download it from the Oracle Technology Network (OTN).
To download the OEHR Sample Objects application from OTN:
In your Web browser, go to:
http://www.oracle.com/technology/products/database/application_express/
Click Packaged Applications.
Click OEHR Sample Objects.
Download and save the oehr_sample_objects.zip
file to your computer.
Unzip and extract the oehr_sample_objects_installer.sql
file:
Microsoft Windows - Double-click the oehr_sample_objects.zip
file
UNIX or Linux - Enter the following command:
$ unzip oehr_sample_objects.zip
After you download and unzip the OEHR Sample Objects application, import it into Oracle Application Express. During the import process, specify installation of both the application and the supporting objects. Installing the application creates the objects and sample data needed to complete the exercises in this guide.
To import and install the OEHR Sample Objects application:
Log in to Oracle Application Express.
For instructions, see "Logging In to the Hosted Demo Environment" or "Logging In to Your Local Instance".
On the Workspace home page, click Application Builder.
The Application Builder home page appears.
Click the Import button.
For Specify File, specify the following:
Import file - Click Browse and navigate to the oehr_sample_objects_installer.sql
file.
File Type - Select Application, Page, or Component Export.
File Character Set - Select the correct character set.
Click Next.
Next, you must install the imported file.
To install an imported file, click Next.
The Install Application Wizard appears.
In the Install Application Wizard, specify the following:
Parsing Schema - Select the schema you created when you set up your development environment.
Build Status - Select Run and Build Application.
Install As Application - Select Auto Assign New Application ID.
Click Install.
For Install Supporting Objects, select Yes and click Next.
Confirm your selections by clicking Install.
After the installation is completed, click the Home breadcrumb link at the top of the page.
The Application Builder home page appears.
If you experience problems installing the OEHR Sample Objects application, verify the available space in your workspace. If you do not have enough space, request additional storage space.
If you are a workspace administrator, you can:
Determine if you have enough storage space. See "Viewing the Workspace Overview Report" in Oracle Application Express Administration Guide.
Request additional storage space. See "Requesting Additional Storage" in Oracle Application Express Administration Guide.
Deleting the OEHR Sample Objects application and deinstalling the supporting objects completely removes all associated objects and sample data.
To delete the OEHR Sample Objects application:
Log in to Oracle Application Express.
On the Workspace home page, click Application Builder.
The Application Builder home page appears.
Click the OEHR Sample Objects icon.
On the Tasks list, click Delete this Application.
The Deinstall page appears.
To remove all associated objects and sample data, select Remove Application Definition and Deinstall Supporting Objects.
Click Deinstall.
If you are using a locally installed instance of Oracle Application Express release 2.2.1.1 or later (not a hosted demo environment such as http://apex.oracle.com
) and have the HR schema installed, you can perform the exercises in this guide directly against the HR schema.
To do so, you must associate the HR schema with your workspace instead of performing the steps described in "Importing the OEHR Sample Objects".
Note: The table names in the HR schema do not include theOEHR prefix (EMPLOYEES versus OEHR_EMPLOYEES ). Because this guide outlines all the steps using the OEHR schema, you must adjust your selections and code accordingly.
Also, note that other users may be using the HR schema. Therefore, the objects or data within the objects may differ from that shown in this guide. |
Review the objects you just created by going to Object Browser. Object Browser enables you to browse, create, and edit objects in your database.
To view the objects:
On the Workspace home page, click SQL Workshop.
Click Object Browser.
Object Browser appears.
Object Browser is divided into two sections:
Object Selection pane displays on the left side of the Object Browser page and lists database objects of a selected type within the current schema.
Detail pane displays to the right of the page and displays detailed information about a selected object.
From the list in the Object Selection pane on the left, select Tables.
The Detail pane lists the tables in your current schema.
In the Object Selection pane, click OEHR_EMPLOYEES from the list.
The Detail pane shows details about the table.
Click the Data tab at the top of the Details pane.
The data in the OEHR_EMPLOYEES
table appears. Note that other tabs show additional details about the object you select.
To search for an object name, enter a case-insensitive term in the Search field.
To view all objects, leave the Search field blank.
See also: "Managing Database Objects with Object Browser" in Oracle Application Express SQL Workshop and Utilities Guide |