3 Getting Started with Oracle Application Express

This section introduces you to areas of the Oracle Application Express user interface. It also shows you how to install the sample objects to use with this guide.

Before you begin, log in to either the host demo environment or your local instance of Oracle Application Express. For instructions, see "Accessing Your Development Environment".

This section contains the following topics:

About the Workspace Home Page

When you log in to Oracle Application Express, the Workspace home page appears.

Description of workspace4.gif follows
Description of the illustration workspace4.gif

Take a few minutes to explore the product. The following three large icons appear in the center of the page:

  • Application Builder. Use Application Builder to assemble an HTML interface (or application) on top of database objects such as tables and procedures. Most exercises in this guide use Application Builder.

  • SQL Workshop. Use the SQL Workshop to access tools to view and manage database objects. Click SQL Workshop to access the following database tools:

    • Object Browser. View, create, modify, browse, and drop database objects. Use the PL/SQL editor to edit and compile packages, procedures, functions, and triggers while taking advantage of error reporting.

    • SQL Commands. Run SQL commands and anonymous PL/SQL, scripts, and saved queries.

    • SQL Scripts. Create, edit, view, run, and delete script files. You can also upload and download scripts from your local file system.

    • Query Builder. Search and filter database objects, select objects and columns, create relationships between objects, view formatted query results, and save queries with little or no SQL knowledge, using Query Builder's graphical user interface.

  • Utilities. Import and export data from the database, generate DDL, view object reports, restore dropped database objects, and perform other tasks.

Note that your workspace and username appear in the lower left corner.

About the Administration List

An Administration list appears on the right side of the Workspace home page. Use the links to administer your application development environment.

If you have administrator or developer privileges, these links appear:

  • Administration. Click this link to view a list of administrative tasks. If you are a developer, you have limited access to these features.

    • Manage Services. Click this link to manage session state, log files, preferences, and application models.

    • Manage Application Express Users. Click this link to manage Application Express user accounts as well as user groups.

    • Monitor Activity. Click this link to monitor page view and application changes.

  • Change Password. Click this link to open a popup window where you can change your workspace password.

  • About Application Express. Click this link to see version and configuration information for both Oracle Application Express and your database.

About the Migrations Link

Use the Migrations link to migrate a Microsoft Access application and generate an Oracle Application Express application from the retrieved objects.

About the Workspace Schemas List

The Workspace Schemas list displays the database schemas that are associated with, and therefore accessible to, this workspace.

About the Links List

The Links list contains links to resources to expand your knowledge of Oracle Application Express.

Description of gtst_reslinks.gif follows
Description of the illustration gtst_reslinks.gif

  • Oracle Technology Network opens the Oracle Application Express section of Oracle Technology Network. Use this page to access additional information and resources about using Oracle Application Express.

    Tip:

    Use this link to check for newer versions of Oracle Application Express, to download packaged applications you can use with Application Express, and to take advantage of sample code to accelerate your development process. For more information, see "Next Steps".
  • Discussion Forum opens the Oracle Application Express Discussion Forum. This is an excellent resource for research and finding answers to questions or answering questions from other users.

  • User's Guide opens an HTML-based online Help system. You can also access online Help by clicking the Help link in the upper right corner of any page in Oracle Application Express.

What Is Application Builder?

You use the Application Builder component of Oracle Application Express to build your application. Through wizards or your direct input, you can assemble an HTML interface (or application) on top of database objects such as tables and procedures. Each application is a collection of pages linked together using tabs, buttons, or hypertext links.

A page is the basic building block of an application. Pages also contain user interface elements such as tabs, lists, buttons, items, and regions. To see the definition of each page belonging to your application, you use the Page Definition page.

Description of gtst_pgdef1.gif follows
Description of the illustration gtst_pgdef1.gif

The Page Definition contains three main areas:

  • Page Rendering lists user interface controls and logic that are executed when a page is rendered. Page rendering is the process of generating a page from the database.

  • Page Processing lists logic controls (such as computations and processes) that are evaluated and executed when the page is processed.

  • Shared Components lists components used by the current page that can also be referenced by other pages within your application.

Installing the Sample Objects

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 need to 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, you need to import the OEHR Sample Objects application.

This section contains the following topics:

Downloading OEHR Sample Objects

To import the OEHR Sample Objects application, you first need to download it from the Oracle Technology Network (OTN):

To download the OEHR Sample Objects application from OTN:

  1. In your Web browser, go to:

    http://www.oracle.com/technology/products/database/application_express/packaged_apps/oehr_sample_objects.zip
    
  2. Save the oehr_sample_objects.zip file to your computer.

  3. 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
      

Importing the OEHR Sample Objects

After you download and unzip the OEHR Sample Objects application, you need to import it into Application Express. During the import process, specify that you want to install 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:

  1. Log in to Oracle Application Express.

    For instructions, see "Logging In to the Hosted Demo Environment" or "Logging In to Your Local Instance".

  2. On the Workspace home page, click Application Builder.

    The Application Builder home page appears.

  3. Click the Import button.

  4. For Specify File, specify the following:

    1. Import file - Click Browse and navigate to the oehr_sample_objects_installer.sql file.

    2. File Type - Select Application, Page, or Component Export.

    3. File Character Set - Select the correct character set.

    4. Click Next.

    Next, you need to install the imported file.

  5. To install an imported file, click Next.

    The Install Application Wizard appears.

  6. In the Install Application Wizard, specify the following:

    1. Parse As Schema - Select the schema you created when you set up your development environment.

    2. Build Status - Select Run and Build Application.

    3. Install As Application - Select Auto Assign New Application ID.

    4. Click Install.

  7. For Install Supporting Objects, select Yes and click Next.

  8. Confirm your selections by clicking Install.

  9. After the installation is completed, click the Home breadcrumb link at the top of the page.

    The Application Builder home page appears.

Checking Your Workspace Storage Space

If you experience problems installing the OEHR Sample Objects application, verify the available space in your workspace. You may need to request additional storage space.

If you are a workspace administrator, you can:

Deleting the OEHR Sample Objects Application

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:

  1. Log in to Oracle Application Express.

  2. On the Workspace home page, click Application Builder.

    The Application Builder home page appears.

  3. Click the OEHR Sample Objects icon.

  4. On the Tasks list, click Delete this Application.

    The Deinstall page appears.

  5. To remove all associated objects and sample data, select Remove Application Definition and Deinstall Supporting Objects.

  6. Click Deinstall.

Using HR Schema Instead of OEHR Sample Objects

If you are using a locally installed instance of Application Express release 2.2.1.1 or higher (not the hosted demo environment) 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 this section to download and import the sample objects.

To associate the HR schema with your workspace:

  1. From the Workspace home page, click Manage Services from the Administration link list on the right.

  2. Click Request Database Schema.

  3. For Identify Schema:

    1. Select Use an existing schema.

    2. Select HR from the Schema Name select list.

    3. Click Next.

  4. For Confirmation, click Finish.

    This sends a request to your Application Express administrator to associate the schema with your workspace.

If your request is approved, you will receive an email notifying you that the association has been completed. Then, you can proceed with the exercises in this guide.

Note:

The table names in the HR schema do not include the OEHR prefix (EMPLOYEES versus OEHR_EMPLOYEES). Because this guide outlines all the steps using the OEHR schema, you will need to 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.

Viewing Your Database Objects

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:

  1. On the Workspace home page, click SQL Workshop.

  2. Click Object Browser.

    Object Browser appears.

    Description of o_brws_oehr.gif follows
    Description of the illustration o_brws_oehr.gif

    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.

  3. From the list in the Object Selection pane on the left, select Tables.

    The Detail pane lists the tables in your current schema.

  4. In the Object Selection pane, click OEHR_EMPLOYEES from the list.

    The Detail pane shows details about the table.

  5. 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.

  6. To search for an object name, enter a case-insensitive term in the Search field.

    Description of o_brws_srch_oehr.gif follows
    Description of the illustration o_brws_srch_oehr.gif

  7. To view all objects, leave the Search field blank.

See also:

"Managing Database Objects with Object Browser" in Oracle Database Application Express User's Guide