300
Oracle Application Express: Developing Web Applications Activity Guide – Volume I D56782GC30 Edition 3.0 December 2011 D75248 Bianca Ababei (biancaababei@oraclecom) has a non-transferable license to use this Student Guide Unauthorized reproduction or distribution prohibited Copyright© 2011, Oracle and/or its affiliates

D56782GC30_ag1

Embed Size (px)

DESCRIPTION

apex

Citation preview

  • Oracle Application Express: Developing Web Applications Activity Guide Volume I

    D56782GC30 Edition 3.0 December 2011 D75248

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright December, 2011, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

    Authors Dimpi Sarmah, Salome Clement

    Technical Contributors and Reviewers Anthony Rayner, Bryan Roberts, Chaitanya Koratamaddi, Christina Cho, Christopher Wensley, Drue Baker, Ganesh Pitchaiah, Hailing Huang, Hilary Farrell, Iloon Ellen, Jason Straub, Jean- Paul Fillon, Joel Kallman, Linda Ross, Nancy Greenberg, Madhavi Siddireddy, Maria Billings, Matthew Gregory, Michael Hichwa, Patrick Wolf, Sharon Kennedy, Terri Jennings, Yi Lu, Wayne Abbott

    This book was published using: Oracle Tutor Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Oracle Application Express: Developing Web Applications Table of Contents i

    Table of Contents

    Practices for Lesson 1: Course Overview ................................................................................................ 1-1 Practices for Lesson 1 ............................................................................................................................. 1-2

    Practices for Lesson 2: Introduction to Oracle Application Express....................................................... 2-1 Practices for Lesson 2 ............................................................................................................................. 2-2 Practice 2-1: Using Oracle Application Express as a Workspace Administrator ......................................... 2-3 Practice 2-2: Using Oracle Application Express as a Developer ................................................................ 2-4 Practice Solution 2-1: Using Oracle Application Express as a Workspace Administrator ............................ 2-5 Practice Solution 2-2: Using Oracle Application as a Developer ................................................................ 2-8

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop .................................... 3-1 Practices for Lesson 3 ............................................................................................................................. 3-2 Practice 3-1: Using Object Browser ......................................................................................................... 3-3 Practice 3-2: Using SQL Commands and SQL Scripts .............................................................................. 3-4 Practice 3-3: Using Utilities ...................................................................................................................... 3-5 Practice Solution 3-1: Using Object Browser ............................................................................................ 3-6 Practice Solution 3-2: Using SQL Commands and SQL Scripts ................................................................ 3-19 Practice Solution 3-3: Using Utilities ........................................................................................................ 3-27

    Practices for Lesson 4: Building a Database Application ........................................................................ 4-1 Practice 4-1: Creating Applications .......................................................................................................... 4-2 Practice Solution 4-1: Creating Applications ............................................................................................. 4-3

    Practices for Lesson 5: Creating Reports ................................................................................................ 5-1 Practices for Lesson 5 ............................................................................................................................. 5-2 Practice 5-1: Building and Manipulating an Interactive Report ................................................................... 5-3 Practice 5-2: Customizing an Interactive Report ....................................................................................... 5-5 Practice 5-3: Creating Classic Reports ..................................................................................................... 5-6 Practice Solution 5-1: Building and Manipulating an Interactive Report ..................................................... 5-7 Practice Solution 5-2: Customizing an Interactive Report .......................................................................... 5-38 Practice Solution 5-3: Creating Classic Reports ....................................................................................... 5-46

    Practices for Lesson 6: Creating Forms ................................................................................................... 6-1 Practices for Lesson 6 ............................................................................................................................. 6-2 Practice 6-1: Creating a Form on a Table ................................................................................................. 6-3 Practice 6-2: Creating a Master Detail Form ............................................................................................. 6-4 Practice 6-3: Creating a Tabular Form ..................................................................................................... 6-5 Practice Solution 6-1: Creating a Form on a Table ................................................................................... 6-6 Practice Solution 6-2: Creating a Master Detail Form ............................................................................... 6-16 Practice Solution 6-3: Creating a Tabular Form ........................................................................................ 6-32

    Practices for Lesson 7: Working with Pages and Regions ...................................................................... 7-1 Practices for Lesson 7 ............................................................................................................................. 7-2 Practice 7-1: Working with Pages and Regions ........................................................................................ 7-3 Practice Solution 7-1: Working with Pages and Regions ........................................................................... 7-5

    Practices for Lesson 8: Understanding Session State and Debugging ................................................... 8-1 Practices for Lesson 8 ............................................................................................................................. 8-2 Practice 8-1: Understanding Session State .............................................................................................. 8-3 Practice 8-2: Debugging Your Application ................................................................................................ 8-4 Practice Solution 8-1: Understanding Session State ................................................................................. 8-5 Practice Solution 8-2: Debugging Your Application ................................................................................... 8-20

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Oracle Application Express: Developing Web Applications Table of Contents ii

    Practices for Lesson 9: Adding Items and Buttons ................................................................................. 9-1 Practices for Lesson 9 ............................................................................................................................. 9-2 Practice 9-1: Adding Items and Buttons ................................................................................................... 9-3 Practice 9-2: Manipulating Items .............................................................................................................. 9-4 Practice 9-3: Creating an Upload and Download Page ............................................................................. 9-6 Practice Solution 9-1: Adding Items and Buttons ...................................................................................... 9-7 Practice Solution 9-2: Manipulating Items................................................................................................. 9-23 Practice Solution 9-3: Creating an Upload and Download Page ................................................................ 9-48

    Practices for Lesson 10: Including Page Processing .............................................................................. 10-1 Practices for Lesson 10: Creating Page Processes .................................................................................. 10-2 Practice 10-1: Creating and Manipulating Computations, Processes, and Validations ................................ 10-3 Solution to Practice 10-1: Creating and Manipulating Computations, Processes, and Validations ............... 10-5

    Practices for Lesson 11: Using Application and Page Utilities................................................................ 11-1 Practices for Lesson 11 ........................................................................................................................... 11-3 Practice 11-1: Using the Advisor .............................................................................................................. 11-4 Practice 11-2: Managing Your Attribute Dictionary .................................................................................... 11-5 Practice Solution 11-1: Using the Advisor................................................................................................. 11-6 Practice Solution 11-2: Managing Your Attribute Dictionary ...................................................................... 11-13

    Practices for Lesson 12: Adding Shared Components That Aid Navigation ........................................... 12-1 Practices for Lesson 12 ........................................................................................................................... 12-2 Practice 12-1: Creating Lists and List Regions ......................................................................................... 12-3 Practice 12-2: Creating and Editing Standard Tabs .................................................................................. 12-4 Practice 12-3: Managing Help Text in Your Application ............................................................................. 12-5 Practice 12-4: Adding Navigation Bar Entries ........................................................................................... 12-6 Practice 12-5: Adding Breadcrumbs and Tabs to an Existing Page ........................................................... 12-7 Practice Solution 12-1: Creating Lists and List Regions ............................................................................ 12-8 Practice Solution 12-2: Creating and Editing Standard Tabs ..................................................................... 12-16 Practice Solution 12-3: Managing Help Text in Your Application ............................................................... 12-24 Practice Solution 12-4: Adding Navigation Bar Entries .............................................................................. 12-30 Practice Solution 12-5: Adding Breadcrumbs and Tabs to an Existing Page .............................................. 12-38

    Practices for Lesson 13: Displaying Dynamic Content ............................................................................ 13-1 Practices for Lesson 13 ........................................................................................................................... 13-2 Practice 13-1: Using Dynamic Actions on Your Page ................................................................................ 13-3 Practice 13-2: Importing and Using the Star Rating Plug-In....................................................................... 13-5 Practice 13-3: Creating and Modifying Flash Charts ................................................................................. 13-6 Practice 13-4: Creating a Calendar .......................................................................................................... 13-7 Practice 13-5: Creating a Tree Whose Nodes Link to a Different Page ...................................................... 13-8 Practice Solution 13-1: Using Dynamic Actions on Your Page .................................................................. 13-9 Practice Solution 13-2: Importing and Using the Star Rating Plug-In ......................................................... 13-35 Practice Solution 13-3: Creating and Modifying Flash Charts .................................................................... 13-45 Practice Solution 13-4: Adding a Calendar ............................................................................................... 13-54 Practice Solution 13-5: Creating a Tree Whose Nodes Link to a Different Page ......................................... 13-62

    Practices for Lesson 14: Working with Themes, Templates, and Files ................................................... 14-1 Practices for Lesson 14 ........................................................................................................................... 14-2 Practice 14-1: Working with Themes, Templates, and Files ...................................................................... 14-3 Practice Solution 14-1: Working with Themes, Templates, and Files ......................................................... 14-5

    Practices for Lesson 15: Administering Oracle Application Express Workspaces ................................. 15-1 Practices for Lesson 15 ........................................................................................................................... 15-2

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Oracle Application Express: Developing Web Applications Table of Contents iii

    Practice 15-1: Administering Oracle Application Express Workspaces ...................................................... 15-3 Practice Solution 15-1: Administering Oracle Application Express Workspaces ......................................... 15-4

    Practices for Lesson 16: Implementing Security ..................................................................................... 16-1 Practices for Lesson 16: Implementing Security ....................................................................................... 16-2 Practice 16-1: Creating an Authentication Scheme ................................................................................... 16-3 Practice 16-2: Restricting Users By Using Access Control ........................................................................ 16-4 Practice Solution 16-1: Creating an Authentication Scheme...................................................................... 16-5 Practice Solution 16-2: Restricting Users By Using Access Control ........................................................... 16-11

    Practices for Lesson 17: Deploying Your Application ............................................................................. 17-1 Practices for Lesson 17: Deploying an Application ................................................................................... 17-2 Practice 17-1: Deploying Your Application................................................................................................ 17-3 Practice Solution 17-1: Deploying Your Application .................................................................................. 17-4

    Practices for Lesson 18: Building a Websheet Application ..................................................................... 18-1 Practices for Lesson 18 ........................................................................................................................... 18-2 Practice 18-1: Creating and Modifying a Websheet Application ................................................................. 18-3 Practice 18-2: Creating and Manipulating a Data Grid .............................................................................. 18-4 Practice Solution 18-1: Creating and Modifying a Websheet Application ................................................... 18-5 Practice Solution 18-2: Creating and Manipulating a Data Grid ................................................................. 18-14

    Practices for Lesson 19: Manipulating and Administrating a Websheet Application.............................. 19-1 Practices for Lesson 19 ........................................................................................................................... 19-2 Practice 19-1: Adding and Manipulating Sections on a Page .................................................................... 19-3 Practice 19-2: Interacting with the Database ............................................................................................ 19-4 Practice 19-3: Sharing Websheets Between Users ................................................................................... 19-5 Practice Solution 19-1: Adding and Manipulating Sections on a Page ....................................................... 19-6 Practice Solution 19-2: Interacting with the Database ............................................................................... 19-16 Practice Solution 19-3: Sharing Websheets Between Users ..................................................................... 19-26

    Practices for Lesson 20: Managing and Maintaining the Application Development Process ................. 20-1 Practices for Lesson 20 ........................................................................................................................... 20-2 Practice 20-1: Adding Features and Milestones to Your Development Project ........................................... 20-3 Practice 20-2: Adding and Monitoring Feedback in Your Application ......................................................... 20-5 Practice Solution 20-1: Adding Milestones and Features to Your Development Project .............................. 20-6 Practice Solution 20-2: Adding and Monitoring Feedback in Your Application ............................................ 20-21

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Course Overview Chapter 1 - Page 1

    Practices for Lesson 1: Course Overview Chapter 1

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Course Overview Chapter 1 - Page 2

    Practices for Lesson 1

    Course Practices: Overview There are no hands-on practices for this lesson. Throughout the course practices, you create an Order Management application. The following practices are mandatory: Practice 2-1: Creates the developer user that you will use to create the Order Management Application Practice 2-2: Installs the database objects required for the rest of the practices Practice 15-1: Creates the users to use in an Access Control list

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 1

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 2

    Practices for Lesson 2

    Practices Overview There are two practices for this lesson. In these practices, you log in to Oracle Application Express and create the user that you will need for the rest of the practices in this course. You also run a sample application and install a packaged application. The packaged application creates an application definition and the database objects that you will need for this course.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 3

    Practice 2-1: Using Oracle Application Express as a Workspace Administrator

    Overview In this practice, you log in to the Oracle Application Express workspace and create a developer user.

    Assumptions N/A

    Tasks a. Log in to Oracle Application Express with the following details:

    Workspace: ora Username: ora_admin Password: ora

    b. Create a developer user with the following details: Username and Password: ora Email: [email protected]

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 4

    Practice 2-2: Using Oracle Application Express as a Developer

    Overview In this practice, you log in to Oracle Application Express as a Developer, run a sample application, and install a packaged application.

    Assumptions You have created the ora user from the previous practice.

    Tasks a. Log in to Oracle Application with the following details:

    Workspace: ora Username: ora Password: ora

    b. Run the sample application.

    c. Install the packaged application and its supporting objects from the following location: /home/oracle/labs/oehr/oehr_object_app_installer.sql

    Note: This application installs the database objects required for the rest of the practices in this course.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 5

    Practice Solution 2-1: Using Oracle Application Express as a Workspace Administrator

    Overview In this practice solution, steps to log in to the Oracle Application Express workspace and create a developer user are provided.

    Tasks a. Log in to Oracle Application Express with the following details:

    Workspace: ora Username: ora_admin Password: ora

    1) Enter the following URL in your browser address bar:

    http://:8080/apex

    2) On the Login page, enter ora for Workspace, ora_admin for Username, and ora for Password, and click Login.

    3) If you are prompted to change your password, enter the old and new passwords and

    click Apply Changes. (You can enter the current password as your new password.)

    4) Click Return. 5) You will be directed to log in again. Enter the new password and click Login.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 6

    6) You have successfully logged in to the Oracle Application Express application as an administrator user.

    b. Create a developer user with the following details:

    Username and Password: ora Email: [email protected]

    1) Click the down arrow on the Administration tab and select Manage Users and

    Groups.

    2) Click Create User >.

    3) Enter ora for Username and [email protected] for Email Address.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 7

    4) Scroll down and verify the account privileges. Make sure that User is a workspace

    administrator is set to No and User is a developer is set to Yes.

    5) Scroll down and enter ora for Password and Confirm Password. Select No for Require Change of Password on First Use.

    6) Scroll up to the top of the page and click Create User.

    7) Click Logout.

    You have successfully created a developer user by logging in to the Oracle Application Express application as a workspace administrator.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 8

    Practice Solution 2-2: Using Oracle Application as a Developer

    Overview In this practice solution, the steps to log in to Oracle Application Express as a developer, run a sample application, and install a packaged application are provided.

    Tasks a. Log in to Oracle Application with the following details:

    Workspace: ora Username: ora Password: ora

    1) Enter ora for Workspace, Username, and Password, and click Login.

    You have successfully logged in to Oracle APEX as a developer.

    b. Run the sample application.

    1) Click the Application Builder icon from the Oracle APEX home page.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 9

    2) Click the Sample Database Application icon.

    3) Click the Run Application icon.

    4) Enter ora for User Name and Password and click Login.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 10

    5) The Sample Database Application displays. Click the various tabs and try to understand what the application does.

    6) Click the Home button on the toolbar at the bottom.

    You have successfully run the sample database application.

    c. Install the packaged application and its supporting objects from the following location:

    /home/oracle/labs/oehr/oehr_object_app_installer.sql 1) Navigate to the Application Builder page by clicking the Application Builder icon.

    2) Click the Import button.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 11

    3) Click the Browse button.

    4) Browse to the /home/oracle/labs/oehr folder, select the oehr_object_app_installer.sql script file, and click Open.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 12

    5) Click Next > to import the file.

    6) You have successfully imported the file. To install the application, click Next >.

    7) Select ora for Parsing Schema and click Install.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 13

    8) To install the supporting objects for the application, ensure that Install Supporting Objects is Yes and click Next >.

    9) Click Install to confirm the installation of supporting objects.

    10) Click Install Summary.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Introduction to Oracle Application Express Chapter 2 - Page 14

    11) Review the Install Summary.

    You have successfully installed a packaged application.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 1

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 2

    Practices for Lesson 3

    Practices Overview There are three practices for this lesson. In these practices, you use the components of SQL Workshop to create and modify tables, upload and run scripts, build and save queries, and load and unload data. Hints in the form of SQL queries have been provided in case you are not familiar with writing SQL queries.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 3

    Practice 3-1: Using Object Browser

    Overview In this practice, you use the Object Browser to view, create, and modify tables.

    Assumptions You should have performed Practice 2-1.

    Tasks a. Create a table called OEHR_AUDITS with the following details:

    Column Name Data Type Other Details

    CUSTOMER_ID (PK) NUMBER Not populated CREATED_BY VARCHAR2 Scale 40 CREATED_ON DATE N/A

    b. Review the data in the OEHR_ORDERS table.

    c. Create a lookup table for the OEHR_ORDERS table by using the ORDER_MODE column.

    Follow the following naming convention: Table name: OEHR_ORDER_MODE_LOOKUP Sequence name: OEHR_ORDER_MODE_LOOKUP_SEQ

    What do you think will happen to the data in both tables after the lookup table is created?

    d. Display the data from the OEHR_COUNTRIES table and save the data in a spreadsheet.

    e. Change the data type for the JOB_TITLE column in the OEHR_JOBS table to char and the length to 300. Bia

    nca Aba

    bei (bian

    caabab

    ei@orac

    lecom) h

    as a non

    -transfer

    able

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 4

    Practice 3-2: Using SQL Commands and SQL Scripts

    Overview In this practice, you use SQL Commands and SQL Scripts to upload, save, and run queries.

    Assumptions You have performed the previous practice.

    Tasks a. Using SQL Commands, update the ORDER_DATE column in the OEHR_ORDERS table

    by running the following query (located in /home/oracle/labs/files/lab3-1.txt). UPDATE oehr_orders SET order_date = order_date + 2290

    b. Upload the CreateTerritories.sql script file from the

    /home/oracle/labs/files folder and name it Create Territory Table. Run the script and confirm that it ran successfully.

    c. Upload the get_sal.sql script file from the /home/oracle/labs/files folder.

    Run the script and correct errors, if any.

    d. Use the get_sal procedure, which was created in the previous task, and execute a query that displays the last name, employee ID, and salary for employees. Also include a proposed salary, which should be 40% more than the current salary.

    Hint: (located in /home/oracle/labs/files/lab3-2.txt) SELECT last_name, employee_id, salary CURRENT SALARY, get_sal(employee_id, 1.4) PROPOSED SALARY FROM oehr_employees;

    Bianca

    Ababei (

    biancaa

    babei@

    oracleco

    m) has a

    non-tran

    sferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 5

    Practice 3-3: Using Utilities

    Overview In this practice, you use SQL Workshop Utilities to build queries, load/unload data, and generate data definition language (DDL).

    Assumptions You have performed the previous practice.

    Tasks a. Using Query Builder, create and save a query to retrieve the department ID, name,

    city, state, and the country name for each department. b. Load data from a flat file to a new database table called OEHR_STATES. The file is

    located at /home/oracle/labs/files/states.txt. The data in the file is stored as comma-separated values (CSV) and the first row in the file contains the column names. Name the table columns STATE_ID and STATE_NAME. Accept the option to create a new primary key and sequence. View the created table in Object Browser.

    c. Unload data from the OEHR_ORDERS table to a CSV file. Ensure that the table column names are also included in the file. Save the file to the /home/oracle/labs/files folder.

    d. Display data from the OEHR_JOBS table in XML format, adhering to the canonical XML specification.

    e. Generate a DDL script file for the STATES table and sequence. Name the file

    states.sql. Download and save the file to the /home/oracle/labs/files folder.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 6

    Practice Solution 3-1: Using Object Browser

    Overview In this practice solution, the steps to view, create, and modify tables by using the Object Browser are provided.

    Tasks a. Create a table called OEHR_AUDITS with the following details.

    Column Name Data Type Other Details

    CUSTOMER_ID (PK) NUMBER Not populated CREATED_BY VARCHAR2 Scale 40 CREATED_ON DATE N/A

    1) Navigate to the Object Browser page by selecting Object Browser from the SQL

    Workshop tab menu.

    2) Click the down arrow in the Create button and select Table.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 7

    3) A Create Table wizard opens. Enter OEHR_AUDITS for Table Name, and then fill out the columns by using the following details. Then, click Next >.

    Column Name Data Type Other Details CUSTOMER_ID (PK) NUMBER Not populated CREATED_BY VARCHAR2 Scale 40 CREATED_ON DATE N/A

    4) Select Not populated for Primary Key. Select CUSTOMER_ID(NUMBER)from the drop-down list for Primary Key and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 8

    5) You do not want to create a foreign key. Click Next >.

    6) You do not want to create constraints. Click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 9

    7) Click Create to create the table.

    8) The OEHR_AUDITS table is created and displayed on the Object Browser page.

    You have successfully created a table.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 10

    b. Review the data in the OEHR_ORDERS table. 1) Select OEHR_ORDERS from the Object Selection pane of the Object Browser page.

    2) The OEHR_ORDERS table is displayed in the detail pane. Click the Data tab.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 11

    3) Review the columns and the data they hold. Notice that the ORDER_MODE column is a good candidate for a lookup table.

    You have identified that a lookup table based on the ORDER_MODE column can be created for the OEHR_ORDERS table.

    c. Create a lookup table for the OEHR_ORDERS table by using the ORDER_MODE column. Follow

    the following naming convention: Table name: OEHR_ORDER_MODE_LOOKUP Sequence name: OEHR_ORDER_MODE_LOOKUP_SEQ What do you think will happen to the data in both the tables after the lookup table is created? 1) Click the Table tab for the OEHR_ORDERS table.

    2) Click the Create Lookup Table button.

    3) Select ORDER_MODE - varchar2 for Column and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 12

    4) Enter OEHR_ORDER_MODE_LOOKUP for New Table Name and OEHR_ORDER_MODE_LOOKUP_SEQ for New Sequence and click Next >.

    5) Review the details and click Finish.

    6) To view the data in the lookup table, click the Data tab.

    7) View the columns and data in the new lookup table. Notice that the data from the OEHR_ORDERS table has been added here and a new primary key column is inserted.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 13

    8) To view the data in the OEHR_ORDERS table, select OEHR_ORDER from the Object Selection pane.

    9) Note that the ORDER_MODE column has been replaced with an ORDER_MODE_ID column.

    You have successfully created a lookup table.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 14

    d. Display the data from the OEHR_COUNTRIES table and save the data in a spreadsheet. 1) Select the OEHR_COUNTRIES table.

    2) Scroll down to the bottom and click the Download link.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 15

    3) Make sure that Open with the open office application is selected and click OK to save the file.

    4) Open Office will open. Ensure that Comma is selected for Separated by and click OK to import the text.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 16

    5) The data is displayed.

    e. Change the data type for the JOB_TITLE column in the OEHR_JOBS table to char and the length to 300. 1) Select the OEHR_JOBS table.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 17

    2) Click the Table tab.

    3) Click Modify Column.

    4) Select JOB_TITLE(VARCHAR2) for Column.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 18

    5) Select CHAR for Datatype, enter 300 for Length, and click Next >.

    6) Click Finish.

    7) Review the change in the table.

    You have successfully modified a table.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 19

    Practice Solution 3-2: Using SQL Commands and SQL Scripts

    Overview In this practice solution, the steps to upload, save, and run queries by using SQL Commands and SQL Scripts are provided.

    Tasks a. Using SQL Commands, update the ORDER_DATE column in the OEHR_ORDERS table

    by running the following query (located in /home/oracle/labs/files/lab3-1.txt). UPDATE oehr_orders SET order_date = order_date + 2290

    1) Select SQL Commands from the SQL Workshop tab menu.

    2) Enter the following command and click Run. UPDATE oehr_orders SET order_date = order_date + 2290

    3) View the output on the Results tab.

    b. Upload the CreateTerritories.sql script file from the /home/oracle/labs/scripts folder and name it Create Territory Table. Run the script and confirm that it ran successfully.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 20

    1) Select SQL Scripts from the SQL Workshop tab menu.

    2) Click the Upload > button.

    3) Click Browse and locate the file to upload.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 21

    4) Select /home/oracle/labs/files/CreateTerritories.sql and click Open.

    5) Enter Create Territories for Script Name and click Upload.

    6) The file was successfully loaded into SQL Scripts. Click the Run icon to run the script.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 22

    7) Click Run Now.

    8) Click View Results.

    9) The script ran without errors.

    You have successfully uploaded and run a script file.

    c. Upload the get_sal.sql script file from the /home/oracle/labs/files folder. Run the script and correct errors, if any. 1) Click the SQL Scripts breadcrumb.

    2) Click the Upload button.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 23

    3) Click Browse. Locate /home/oracle/labs/files/get_sal.sql and click Open. Then, click Upload.

    4) Run the script by clicking the Run icon.

    5) Click Run Now.

    6) Click View Results.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 24

    7) Notice that the script has an error. Click Edit Script.

    8) Notice that the statement in line 6 is missing a semicolon at the end. Correct the

    code and click Run.

    9) Click Run Now.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 25

    10) Click View Results.

    11) The script ran without errors this time.

    You have successfully uploaded, edited, and run a script file.

    d. Use the get_sal procedure, which was created in the previous task, and execute a

    query that displays the last name, employee ID, and salary for employees. Also include a proposed salary, which should be 40% more than the current salary.

    Hint: (located in /home/oracle/labs/files/lab3-2.txt) SELECT last_name, employee_id, salary CURRENT SALARY, get_sal(employee_id, 1.4) PROPOSED SALARY FROM oehr_employees;

    1) Select SQL Commands from the SQL Workshop menu.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 26

    2) Enter the following query and click Run. SELECT last_name, employee_id, salary CURRENT SALARY, get_sal(employee_id, 1.4) PROPOSED SALARY FROM oehr_employees;

    3) View the output on the Results tab.

    You successfully ran a SQL command that used the get_sal function that you created in the previous task.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 27

    Practice Solution 3-3: Using Utilities

    Overview In this practice solution, the steps to build queries, load/unload data, and generate DDL by using SQL Workshop Utilities are provided.

    Tasks a. Using Query Builder, create and save a query to retrieve the department ID, name,

    city, state, and the country name for each department. 1) Select Query Builder from the SQL Workshop tab menu.

    2) From the Object Selection pane, select the OEHR_DEPARTMENTS,

    OEHR_LOCATIONS, and OEHR_COUNTRIES tables. They will appear in the Display pane.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 28

    3) Select the columns that you want to retrievenamely, DEPARTMENT_ID and DEPARTMENT_NAME from the OEHR_DEPARTMENTS table; CITY and STATE_PROVINCE from the OEHR_LOCATIONS table; and, COUNTRY_NAME from the COUNTRIES table.

    4) Now you want to join these tables. To join the OEHR_DEPARTMENTS and

    OEHR_LOCATION tables, select the join column for the LOCATION_ID column in the OEHR_DEPARTMENTS table, and then click the join column for the LOCATION_ID column in the OEHR_LOCATIONS table.

    5) Similarly, join the OEHR_LOCATIONS and OEHR_COUNTRIES table on the

    COUNTRY_ID column.

    6) Click the Run button.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 29

    7) The output is displayed on the Results tab of the Output pane.

    8) To save the query, click the Save button.

    9) Enter a name for the query and click Save.

    10) The query is listed on the Saved SQL tab of the Output pane.

    You have successfully created and saved a query by using Query Builder.

    b. Load data from a flat file to a new database table called OEHR_STATES. The file is located at /home/oracle/labs/files/states.txt. The data in the file is stored as comma-separated values (CSV) and the first row in the file contains the column names. Name the table columns STATE_ID and STATE_NAME. Accept the option to create a new primary key and sequence. View the created table in the Object Browser.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 30

    1) Select Data Workshop from the SQL Workshop tab menu.

    2) From the Data Load pane, click Text Data.

    3) Ensure that New table is selected for Load To and Upload file for Load From and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 31

    4) Click Browse.

    5) Select the /home/oracle/labs/files/states.txt file and click Open.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 32

    6) Click Next >.

    7) Enter OEHR_STATES for Table Name. Change the first column name to STATE_ID and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 33

    8) Select Use an existing column for Primary Key From and make sure that STATE_ID(VARCHAR2) is selected for Primary Key and click Load Data.

    9) To view the created table, click the SQL Workshop breadcrumb.

    10) Click Object Browser.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 34

    11) From the Object Selection pane, locate and click the OEHR_STATES table.

    12) View the created table.

    You have successfully loaded a table stored in a text file to the Oracle database.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 35

    c. Unload data from the OEHR_ORDERS table to a CSV file. Ensure that the table column names are also included in the file. Save the file to the /home/oracle/labs/files folder.

    1) Select Data Workshop from the SQL Workshop tab menu.

    2) From the Data Unload pane, select to Text.

    3) Select OEHR_ORDERS for table and select all the columns. Click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 36

    4) Select the Include Column Names check box and click Unload Data.

    5) Select Save File and click OK. Your file should be saved to the Desktop.

    Note: If you select the Open with option, you need to associate gedit. To do this, select Other from the drop-down list and navigate to /usr/bin/gedit.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 37

    6) If you open the file (use gedit), it will look similar to the following:

    You have successfully unloaded table data to a text file and saved it in your local file system.

    d. Display data from the OEHR_JOBS table in XML format, adhering to the canonical XML specification. 1) Select Data Workshop from the SQL Workshop tab menu.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 38

    2) From the Data Unload pane, select to XML.

    3) Select OEHR_JOBS for Table and select all the columns. Click Unload Data.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 39

    4) The XML is displayed. (If the XML opens in the same browser, click the Back button.)

    You have successfully displayed table data in XML format.

    e. Generate a DDL script file for the STATES table and sequence. Name the file states.sql. Download and save the file to the /home/oracle/labs/files folder. 1) Select Utilities from the SQL Workshop tab menu. (Click the Back button in your

    browser to return to APEX development, if required.)

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 40

    2) Click Generate DDL.

    3) Click Create Script >.

    4) Ensure that your schema is selected and click Next >.

    5) Select Save As Script File for output. Select the Table and Sequence object type

    check boxes and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 41

    6) Locate and check OEHR_STATES_SEQ and OEHR_STATES (not shown in the screenshot) and click Generate DDL.

    7) Enter states.sql for Script Name and click Create Script.

    8) The DDL script has been generated. Select the edit pencil icon for the

    states.sql script.

    9) The DDL is displayed.

    You have successfully generated DDL.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Interacting with the Database by Using SQL Workshop Chapter 3 - Page 42

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 1

    Practices for Lesson 4: Building a Database Application Chapter 4

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 2

    Practice 4-1: Creating Applications

    Overview In this practice, you create database applications in three different ways: from a spreadsheet, from scratch, and instantly.

    Assumptions You have performed the previous practices or imported LAB03_SOLN.SQL.

    Tasks a. Create an application named Tasks based on the tasks.txt file available in the

    /home/oracle/labs/files folder. The file has tab-delimited information and the first row contains the column names. Name the table where the data from the file is uploaded to as Tasks. Ensure that the data is displayed as an interactive report and can be edited, if required. Use Theme 1 for the application.

    b. Create an application named Customers that has the Report and Form pages based on the DEMO_CUSTOMERS table. Specify no tabs and no authentication for the application. Use DD-MON-YYYY as the date format and use Theme 20.

    c. Create an instant application named Order Management. In the rest of the practices in this course, you will complete this application by creating pages, regions, processes and so on.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 3

    Practice Solution 4-1: Creating Applications

    Overview In this practice solution, the steps to create applications from a spreadsheet, from scratch, and instantly are provided.

    Tasks a. Create an application named Tasks based on the tasks.txt file available in the

    /home/oracle/labs/files folder. The file has tab-delimited information and the first row contains the column names. Name the table where the data from the file is uploaded to as Tasks. Ensure that the data is displayed as an interactive report and can be edited, if required. Use Theme 1 for the application. 1) Navigate to Application Builder > Database Applications.

    2) On the Application Builder home page, click Create >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 4

    3) Select Database and click Next >.

    4) Select From Spreadsheet and click Next >.

    5) Select Upload file, comma separated (*.csv) or tab delimited and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 5

    6) Click the Browse button or select the Text File field.

    7) Select the tasks.txt file from the /home/oracle/labs/files folder and click Open.

    8) To specify that the data is tab delimited, enter \t in the Separator field. Ensure that the First row contains column names check box is selected and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 6

    9) For Table Name, enter TASKS. Note that you can see all the data sorted as rows and columns. Click Next >.

    10) Enter TASKS for Plural Name and click Next >.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 7

    11) Ensure that Application Name is TASKS, Create Mode is Read and Write, and Report Implementation is Interactive. Click Next >.

    12) Select Theme 1.

    13) Click Next >.

    14) Click Create. The Tasks application is created.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 8

    15) To view the application, click Run Application.

    16) For Username and Password, use ORA and ORA, respectively (where n is

    the number that you are assigned). Click Login.

    17) The home page of the Tasks application is displayed. It displays an interactive

    report by using the data from the flat file. Click Home from the developer toolbar to return to the development environment.

    Bianca A

    babei (b

    iancaab

    abei@o

    raclecom

    ) has a n

    on-trans

    ferable

    license to

    use this

    Studen

    t Guide

    Una

    utho

    rized

    repr

    oduc

    tion

    or d

    istri

    butio

    n pr

    ohib

    ited

    Cop

    yrig

    ht

    201

    1, O

    racl

    e an

    d/or

    its

    affil

    iate

    s

  • Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Building a Database Application Chapter 4 - Page 9

    b. Create an application named Customers that has the Report and Form pages based on the DEMO_CUSTOMERS table. Specify no tabs and no authentication for the application. Use DD-MON-YYYY as the date format and use Theme 20.

    1) Navigate to the Application Builder home page and click Create >.

    2) Select Database and click Next >.

    3) Ensure that From Scratch is selected and