2.1. Creating a Database Application
2.1.1. ProblemYou need to create a database application that contains a data entry form to manage a master list of customers and their details.
2.1.2. SolutionIt's best to approach this problem in two parts. First, create the customer table. Then create the application, including a data entry form.
2.1.2.1. Creating the Customers TableHere's how to create the customers table:
Login to an existing APEX workspace as a developer.
You will now need to create the Customers table. Click on the SQL Workshop Object Browser menu item. In the ensuing window, click the Create button in the top right corner, and choose the Table menu item.
You will be presented with a window that allows you to define your database table. Specify a name for the table and define a few fields for the table. You may create a mix of NVARCHAR2, NUMBER, and DATE fields.
Click the Next button to continue. You can define a primary key in this screen, if needed. Set the primary key to the ID field of your table.
Click the Next button. The next page allows you to define a foreign key (if available). Since there isn't one at the moment, skip this page and click the Next button again. In the next page, you can define constraints on your table. You may, for example not want to have duplicate records (two records of a particular company with the same name). Choose to create a unique constraint on the Name field.
Click the Next button. You can see a summary of the table that will be created. Click the Create button to confirm the request, after which your table will be generated. If you browse your list of tables, you should see the Customers table appear in that list