5.1. More Data Design

The purpose of this chapter is to show you some of the wonderful things you can do with reports and charts, but the data model currently in place is less than challenging. You have one real master-detail relationship, with some other foreign keys used to implement data integrity.

Before you can really see what APEX reports and charts can do for you, you will have to add one more table to your schema. You will create the basic table for customer information using SQL Workshop, and then you will expand that table structure and use a script to load additional data.

Try It Out: Create Another Lookup Table

You have already created a lookup table for CATEGORIES and taken the steps required to take advantage of the table in your application. The first part of adding customer information to your schema follows the same steps:

  1. Go to the SQL Workshop area of the APEX development environment.

  2. Use the cascading menus from the Object Browser to browse the tables.

  3. Select the ORDERS table, and click on Create Lookup Table.

On the next page, you will see that, by default, you have been presented with a list of all character columns for the table.

  1. Select CUSTOMER_NAME for the Column, and click Next.

The next page prompts you for a name for the new table and the new sequence that will be used to generate IDs for the table. You will want to change these to make the names more in keeping with the naming standards in your schema.

  1. Change New Table Name to CUSTOMERS and New Sequence ...

Get Beginning Oracle® Application Express now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.