O'Reilly logo

Beginning Oracle® Application Express by Paul Turley, Chris Leiter, Dan Wood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.4. Rich User Interfaces

In the past few years, users have come to expect rich media, such as images, as a standard part of their applications. These expectations had to be met with enhanced functionality in underlying databases as well as application development environments. With APEX, you can add graphical and multimedia user interface elements as easily as using more standard types of data.

Before you can use, in this case, images in your APEX application, you will have to modify a table in which to store them and then use an SQL script to load them.

Try It Out: Adding Columns to Support Images to a Table

Your first step is to go to the SQL Workshop and add some columns to your PRODUCTS table to store images of the products. You will have to add a column to hold the image, and also a few more columns to support the automatic functionality used with images in an APEX application.

  1. Return to the development environment and go to the SQL Workshop by clicking on the appropriate tab.

  2. Use the Object Browser to access your tables.

  3. Select the PRODUCTS table in the left-hand panel. Click the Add Column button to add the first column.

The page shown in Figure 6-34 shows the completed page for the first column you will add, the column that will hold the actual image.

  1. Give the new column the name of PRODUCT_IMAGE in the Add Column field, allow it to be NULL, and set the type to BLOB. Click Next and then confirm the addition by clicking the Finish button.

If you are unfamiliar with relational ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required