Tutorial
Tutorial
Designer/2000 Tutorial
Release 2.1.1
August 1998
Release 2.1.1
This software was not developed for use in any nuclear, aviation, mass transit, medical, or other
inherently dangerous applications. It is the customer’s responsibility to take all appropriate
measures to ensure the safe use of such applications if the programs are used for such purposes.
If this software/documentation is delivered to a U.S. Government Agency not within the Department of
Defense, then it is delivered with “Restricted Rights”, as defined in FAR 52.227-14, Rights in Data -
General, including Alternate III (June 1987).
The information in this document is subject to change without notice. If you find any problems in the
documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error-free.
Oracle, SQL*Plus, SQL*Net, CASE Dictionary, Oracle Forms and Oracle Reports are registered
trademarks of Oracle Corporation.
Designer/2000, Developer/2000, Oracle Forms Generator, Oracle Graphics, Oracle Process Modeller,
Oracle Reports Generator, Oracle Repository Administrator, Oracle Server Generator, Oracle Systems
Designer, Oracle Systems Modeller, Oracle WebServer, Oracle7, Oracle7 Server, Personal Oracle7 and
PL/SQL are trademarks of Oracle Corporation.
All other products or company names are used for identification purposes only, and may be trademarks
of their respective owners.
Contents
1 Introducing Designer/2000
What is Designer/2000?................................................................................................................ 1-1
The components of Designer/2000.............................................................................................. 1-2
Starting Designer/2000 tools and utilities for the tutorial........................................................ 1-3
i
2 Preparing for the tutorial
Scope of the tutorial ....................................................................................................................... 2-1
Time to allow for the tutorial........................................................................................................ 2-2
How to follow the tutorial ............................................................................................................ 2-2
Removing existing tutorial tables ................................................................................................ 2-3
Background to the tutorial............................................................................................................ 2-4
Part II Tutorial
ii
Lesson 6 Build a database
Create the database tables............................................................................................................. Le 6-1
iii
iv
Send Us Your Comments
Designer/2000 Tutorial, Release 2.1.1
Part No. Z23274-02
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this
publication. Your input is an important part of the information used for revision.
■ Did you find any errors?
■ Is the information clearly presented?
■ Do you need more information? If so, where?
■ Are the examples correct? Do you need more examples?
■ What features did you like most about this manual?
If you find any errors or have any other suggestions for improvement, please indicate the chapter,
section, and page number (if available). You can send comments to us in the following ways:
■ [email protected]
■ +44 (0)118 9245019. Attn: Designer/2000
■ Oracle Corporation UK Ltd
Designer/2000 Documentation
Oracle Parkway
Thames Valley Park
Reading, Berks. RG6 1A
United Kingdom
If you would like a reply, please give your name, address, and telephone number below.
If you have problems with the software, please contact your local Oracle World Wide Support Center
v
vi
Read This First!
Before you start reading this document, it is important that you understand the
following:
• the purpose of this document
• the intended audience for this document
• the prerequisites for using this document
• the structure of this document
• how to use this document
• conventions used in this document
• related documentation
• that your comments are welcome!
vii
• refine the default database design
• generate objects in the database
• refine default functions
• create default module definitions
• set preferences for generation
• create lookup tables
• generate a form
• generate a WebServer application
This tutorial does not attempt to describe in detail the functionality of every
Designer/2000 product component. Instead, the tutorial concentrates on how to use
the components together to progress from a high level business model to a working
generated application. For comprehensive information, refer to the Designer/2000
help system.
Note that to enable you to use several different Designer/2000 product components
within a relatively short period, the tutorial assumes a very small business scenario.
This scenario is not representative of the more sophisticated environments in which
Designer/2000 is typically used.
viii
Prerequisites for using this document
This tutorial does not assume you have any prior experience with Designer/2000.
However, this tutorial does assume that:
• you are familiar with the operation of your personal computer (PC) and its
keyboard.
• you are familiar with the Microsoft Windows 95 or Windows NT environment,
as appropriate.
• the PATH variable on your PC includes the appropriate path to the \bin
directory below the <ORACLE_HOME> directory (the directory in which
Oracle products are installed). For example:
Environment Example ORACLE_HOME PATH must include
Windows 95 C:\orawin95 C:\orawin95\bin
Windows NT C:\orant C:\orant\bin
ix
Structure of this document
The tutorial is organized into the following Parts:
Part I “Before You Start”, introduces Designer/2000 and prepares you for the
tutorial.
Part II “Tutorial”, comprises 11 lessons, each made up of one or more tasks.
x
Related documentation
Information about Designer/2000 products is available in printed form in the
following manuals:
• Oracle Designer/2000 Installation Guide
Part No. Z23276
xi
xii
Part I
Before You Start
This chapter introduces the Designer/2000 tools and utilities and contains the
following sections:
■ What is Designer/2000?
■ The Components of Designer/2000
■ Starting Designer/2000 Tools
What is Designer/2000?
Oracle Designer/2000 is a software tool for analyzing business requirements and for
designing and generating client/server systems that meet those requirements.
Designer/2000 incorporates support for business process modeling, systems
analysis, software design and system generation.
Designer/2000 provides a multi-user Repository and is closely integrated with
Developer/2000, Oracle’s client/server development toolset. In this way,
Designer/2000 allows organizations to design and rapidly deliver scalable,
client/server systems that can adapt to changing business needs.
If this dialog box appears, enter the username and password for the user account
you will be using during the tutorial. In the Connect String field, enter the name of
the database you will be using.
In this example, a user with the username ‘analyst’ and a password of ‘teachme1’ is
attempting to connect to a database called ‘olympic’.
If you are not sure what to enter in the Connect dialog box, ask your system
administrator.
The application system dialog box appears, enabling you to select the application
system you will be using to follow the tutorial.
To start a Designer/2000 tool from the Designer/2000 window, you click once on
the button for that tool.
This chapter describes the tutorial in this document, and includes the following
sections:
■ Scope of the tutorial
■ Time to allow for the tutorial
■ How to follow the tutorial
■ Removing existing tutorial tables
■ Background to the tutorial
Processes play a critical role in the way a business works. Modeling a process
enables you to both understand and improve existing processes, and also to design
new processes.
With Designer/2000, you model a business process using a process diagram. The
diagram shows the sequence of process steps that create a product or service within
the business, and the flow of information between them. Some products and
services might be for customers outside the organization. Other processes provide
internal benefit and help manage the business.
Process Modeller enables you to create process diagrams to model business
processes. The data from a process diagram is stored in the Designer/2000
Repository and is available for use by other Designer/2000 tools. In particular,
process steps are stored in the Repository as functions, which you can access using
the Function Hierarchy Diagrammer.
A process diagram has already been created to model customer order processing at
a pizza delivery company. During this lesson you will:
■ enter new process steps called ADD NEW PRODUCT TO THE MENU and
PUBLISH MENU ON THE WEB in the Satisfy Customer Order process
■ indicate the flow of information between the new process steps
Note: Before you start this lesson, make sure you have followed the
instructions in Chapter 2, “Preparing for the Tutorial”.
Objective
To add new process steps to the existing diagram modeling the Satisfy Customer
Order process. These process steps are to be represented on the diagram by two of
the icons shipped with Process Modeller.
Instructions
1. Display the Designer/2000 window (follow the instructions in “Starting
Designer/2000 Tools and Utilities for the Tutorial” in Chapter 1).
2. Click on the Process Modeller button in the Designer/2000 window to start
Process Modeller.
7. Move the mouse pointer into the lowest swim lane (the horizontal strip next to
the ’Unspecified’ organization unit).
You can now change the icon that represents the new process step.
11. Double click on the ADD NEW PRODUCT TO THE MENU process step to
display the Edit Process Step dialog box.
Objective
To add a flow to the process diagram, between the ADD NEW PRODUCT TO THE
MENU process step and the PUBLISH MENU ON THE WEB process step, and to
add a trigger and outcome.
Instructions
1. Click on the Create Flow toolbar button.
4. Click on OK to close the dialog box and add the flow to the diagram.
5. Click on the Create Trigger toolbar button.
Any application you develop will store and manipulate information, so an essential
part of developing a system is constructing an accurate model of the information
needs of an organization. The information model will act as a framework for the
development of new or enhanced systems.
One technique used to model an organization’s information requirements is entity
relationship modeling. Entity relationship modeling involves identifying the things
of importance in an organization (entities), the properties of those things (attributes)
and how they are related to one another (relationships).
The Entity Relationship Diagrammer, one of the Designer/2000 tools, enables you to
create an entity relationship model in the form of a diagram showing the elements
of information and the way they are logically related.
An entity relationship diagram has already been created for Speedy Pizza, modeling
the information needs of the business. During this lesson, you will:
■ enter a new entity, PRODUCT
■ specify the relationship between the PRODUCT entity and the PRICED
PRODUCT entity.
■ define the attributes of PRODUCT
Objective
To add an entity representing PRODUCT to the entity relationship diagram
modeling the order processing area of the business.
Instructions
1. Click on the Entity Relationship button in the Designer/2000 window to start
the Entity Relationship Diagrammer.
Hint: You might have to resize the window to view all the entities.
4. Click on the Entity toolbar button.
Objective
To create a relationship between the PRICED PRODUCT entity and the PRODUCT
entity.
Instructions
1. Click on the Many-to-One (Mandatory to Optional) Relationship toolbar button.
Objective
To add attributes to the new PRODUCT entity.
Instructions
1. Double click on the PRODUCT entity to display the Edit Entity dialog box.
You are now ready to enter the attributes of the PRODUCT entity.
PRODUCT VARCHAR2 30
DESCRIPTION
PRODUCT ID INTEGER 6 æ
PRODUCT PRODUCT VARCHAR2 10
TYPE TYPE
Hint: Use the horizontal scroll bar to see the Format, Max Len, Dec and Primary
fields.
3. Double check that you have entered all of the attribute details correctly (this is
important for the rest of the tutorial).
Each occurrence of an entity can be uniquely identified by one or more of its
attributes. Because you have checked Primary against ID, that attribute will be
used as the unique identifier (UID). You can confirm this on the UIDs tab. You
could also use the UIDs tab to change the composition of the UID or to create
alternate UIDs. For this tutorial, we will not make these changes.
Hint: You might have to resize the PRODUCT entity to see all the attributes.
5. Select File → Save Diagram, then select File → Exit to close the Entity
Relationship Diagrammer.
Lesson summary
In this lesson you used the Entity Relationship Diagrammer to enter a new entity,
PRODUCT. You specified the relationship between the PRODUCT entity and the
PRICED PRODUCT entity. You defined the PRODUCT entity’s attributes.
Objective
To identify which of the existing functions are to be automated.
Hint: You might have to resize the window or use zoom to view the entire
function hierarchy.
4. Click the Function button in the toolbar.
6. In the Label box, type AUTO 1 and in the Short Definition box type in Handle
automated functions. Click the OK button. The AUTO 1 function appears
on the diagram as a root function.
This new root function can now be used as the parent of functions that already
exist on the diagram. To do this, you drag the child functions and drop them
onto the root function. It is important when doing this that you position the
mouse pointer precisely in the centre of the root function before releasing the
mouse button. Otherwise, the moved function will become another root
function. The mouse pointer changes shape to help with this.
7. Drag the Record Customer Order function (i.e., DELI 1.1 (AUTO))to the centre
of the AUTO 1 function until the mouse pointer shape changes to that shown
below.
Releasing the mouse button reparents DELI 1.1 (AUTO) Record Customer
Order under the AUTO 1 root function.
Objective
To specify how the PRODUCT entity is used by the "Add new product to the menu"
and "Publish menu on the Web" functions.
Instructions
1. Double click the function DELI 10.4 (AUTO) Add new product to the menu.
This opens the Edit Function dialog box.
PRODUCT æ æ æ æ
PRICED_PRODUCT æ æ æ æ
The usage flags indicate how the function uses the information represented by
the entities.
Hint: Use the horizontal scrollbar to see the Delete, Archive and Other usage
flags.
3. Click on OK to close the Edit Function dialog box.
4. Set up entity usages for entities DELI 10.5 (AUTO) as below.
PRODUCT æ
PRICED_PRODUCT æ
5. If you wish, save the diagram with a name of your choice. Note that you do not
have to save the diagram in order to save the data that you have input in this
lesson.
Instructions
1. In the Function Hierarchy Diagrammer, select Utilities>Function/Attribute
Matrix.
This displays the Create Function/Attribute Matrix dialog box.
Lesson summary
In this lesson you identified which functions should be automated and created
entity and attribute usages.
When you record an entity model in the Repository, you are specifying the things
the business needs to manipulate and about which information has to be stored. The
next stage is to design a database in which to hold this information.
The Database Design Transformer, one of the Designer/2000 tools, enables you to
create and maintain a database design based upon the entity model recorded in the
Repository. The resulting database design comprises a number of database object
definitions including table definitions (to record instances of entities), column
definitions (to store attributes), and foreign key constraint definitions (to implement
relationships between entities). The Database Design Transformer also creates and
maintains additional elements to support the design.
Like the entity model, the database design generated by the Database Design
Transformer is stored in the Repository. Later in the tutorial, you will use other
Designer/2000 tools to create the database itself, based on this design.
During this lesson, you will use the Database Design Transformer to create new
table and column definitions in the Repository from the entity and attributes that
you defined in the previous lesson (and from the supplied entities).
Objective
To create table definitions in the Repository from the design information on the
entity-relationship diagram.
Instructions
1. In the Entity Relationship Diagrammer, open the SPEEDY PIZZA - ERD1
diagram.
Note that the PRICED PRODUCT entity has no unique identifier (i.e., no
attribute marked with a #). This will be created later by the Database Design
Transformer.
2. Select Utilities → Database Design Transformer.
3. Ensure that the "Run the Transformer in Default Mode" and "All entities"
options are selected.
4. Click on Run to run the Database Design Transformer.
The Design Transformer Output window appears, detailing the operations
performed by the Database Design Transformer.
The Database Design Transformer creates table and column definitions from the
entities and attributes. The name of the table definition is the plural version of
the entity name, with spaces converted to underscores. The names of the
column definitions are the attribute names preceded by an abbreviation
(representing the table name) and an underscore.
In the next lesson, you will use the Design Editor to view the definitions created
by the Database Design Transformer.
Lesson summary
In this lesson you used the Database Design Transformer to create new table and
column definitions in the Repository from entities and attributes.
Having refined the database design, you use the Server Generator to generate the
server-side components for the system.
The Server Generator can create objects on a local or remote database from
definitions recorded in the Repository.
During this lesson you will:
■ create the database tables on a local Oracle database
Objective
To create the database tables required for your system.
Instructions
1. In the Design Editor, select Generate → Generate Database From Server Model.
This opens the Generate Database From Server Model dialog box.
2. On the Target tab, choose the Database option button and enter the connection
details (the same as for your current connection).
3. On the Objects tab, move all objects into the Generate list by clicking the double-
right-arrow button.
5. Click the Execute DDL button. This creates the database tables and other
objects.
After the ’Processing Complete’ message appears in the message window, you can
use the Database Navigator to see the database objects that have been created.
You open the Database Navigator by selecting Tools → Database Navigator. Note
that no triggers have been created for any of the tables. You should close the
Database Navigator before continuing.
You can close the Design Editor. There is no need to save the server model diagram
that you created, but you may do so if you wish.
Lesson summary
In this lesson you used the Server Generator to create the tables on the database.
Once the analysis data is as complete as possible and the database design is stable
and complete, you are ready to create a first-cut application design based on
information stored in the Repository.
The Designer/2000 utility to produce the first-cut application design is the
Application Design Transformer. The Application Design Transformer converts
functions into candidate modules, which can then be implemented as forms, reports
and utilities. The Transformer also converts function data usages to module data
usages that define how a module uses the tables and columns in the database.
The modules created by the Application Design Transformer are ’candidate’
modules and are not included in the application design until you accept them (by
changing their ’Candidate’ property to ’No’). Modules you accept, and their usages,
can then be used for generating applications.
Objective
To create module definitions for the automated functions.
Instructions
1. Click on the Function Hierarchy button in the Designer/2000 window to start
the Function Hierarchy Diagrammer.
Note: If you leave this option set to the default (i.e., Identical
Entities), the Application Design Transformer will create a single
module definition for functions DELI 10.4 (AUTO) and DELI 10.5
(AUTO). This single module definition will not enable you to
continue with the tutorial.
Objective
To make the default module definitions ready for generation.
Instructions
1. Click on the Design Editor button in the Designer/2000 window to start the
Design Editor.
2. Choose the Module Applications option on the Welcome screen, then click the
OK button. (If the Welcome screen did not appear, change directly to the
Modules tab in the Navigator window.)
3. Select Options → Use Property Palette (the option may already be chosen), then
expand the list of Modules in the Navigator and double click on the icon for the
first module in the list.
The property names for a particular object are listed in the cells in the left
column. The values for the properties are listed in the cells in the right column.
When you click on a values cell, it changes to an appropriate input control. The
controls you will be using include the drop-down box and the list box. When
using the list box, you obtain the list of possible values by clicking the icon on
the right of the cell.
The changes that you make to the values of a particular object (in this case
module definitions), will be saved automatically if you display the values for
another object. You can also save the values manually.
To save the changes that you make on the Property Palette manually, select
File → Save Uncommitted Data, or click on the Property Palette toolbar.
4. Under the heading "Planning", change the Candidate? property to No, then save
the data manually (as described above).
The icon for the first module changes to represent a Form.
Objective
To generate a default working form from a module definition.
Instructions
1. In the Navigator, highlight module TUTORI0040 ("Add new product to menu").
2. Select Generate → Generate Module. This opens the Generate Form dialog box.
Note: The tutorial.olb and tutorial.fmb files are copies of the files
ofgstnd1.olb and ofgpc1t.fmb files, as they were originally supplied
with Designer/2000. If you use modified versions of these files, or
alternate files, you will not get the results described in the
remainder of this tutorial.
4. Click the Options button to open the Form Generator Options dialog box, and
on the Run tab set the Run Form option to Yes. Click the OK button.
5. On the Generate Form dialog box, click the Start button.
Progress is reported in the message window. Blue messages will tell you about
changes that the generator intends to make to the module definition. The
Generation Complete message box is then displayed, giving you the option to
save the changes to the module definition or to revert to the pre-generation
state.
You can use this form now if you wish. The details that you enter will be
recorded on the PRICED_PRODUCTS and PRODUCTS tables of the database
that you generated earlier.
The cursor will be flashing in the Size Code field, but first you need to set up
Products information, so click the Discount Day field. Notice that there is a hint
message at the foot of the window that says there is a list of values available. To
obtain the list of values, click the List button in the toolbar. Double click on
one of the values to enter it into the list.
In lesson 7 you generated (and possibly used) a form that had been given default
characteristics based on design information supplied earlier. You can now change
the default characteristics to meet your further requirements. One way to do this is
to use the Navigator to find the object that you want to change (e.g., the Discount
Day field), then open the Property Palette and make the changes. Another way is to
open a diagram so that the objects can be easily seen, then to open the Property
Palette from the diagram. The latter method is described in this lesson.
Objective
To set up a drop-down list and change a field prompt on the Priced Products form.
2. Display the Property Palette for the SIZE_CODE bound item property, in one of
the following ways.
If the Property Palette is already open, you display the correct properties by
single clicking SIZE_CODE on the diagram.
If the Property Palette is not already open, you open it by selecting
Options → Use Property Palette then double clicking the A icon next to
SIZE_CODE.
The Property Palette title bar will say "TUTORIAL: Bound Item Properties".
Objective
To change the Products table into a lookup table.
Instructions
1. On the module diagram for TUTORIO0040, drag the PRODUCTS table usage
(yellow box) so that its left side overlaps the right side of the
PRICED_PRODUCTS table usage.
2. When a broken vertical indicator line appears to the right of the
PRICED_PRODUCTS table usage, release the mouse button.
Lesson summary
In this lesson you:
■ made it possible to choose the values for Size Code from a drop-down list
■ changed a field prompt to make it more meaningful
■ set up a lookup table.
During this lesson, you will make further changes to the default design of the Priced
Products form. You will then regenerate the form to incorporate all the changes you
have made.
Objective
To increase the width of border lines on the generated form.
2. Expand the Layout - Block preference node and change the "Block brush width"
(BLKBWD) preference to 4.
You can obtain an explanation of a preference by clicking on the Context
Sensitive Help button on the toolbar and then clicking on the preference name.
3. Save the preference data by clicking the Save button on the palette toolbar.
4. Close the Generator Preferences palette.
Objective
To change the order of the fields on the generated form so that Product Id is the
first.
Instructions
1. Make the Module Diagram for TUTORI0040 active, then select View → Display
View.
The diagram appears as follows:
Objective
To generate, run and use the refined Products form definition.
Instructions
1. Select Options → Generator Options → Forms. This opens the Form Generator
Options dialog box.
2. On the Run tab, set Run Form to No, then click the OK button.
3. Select the TUTORI0040 module in the Navigator or on a Module Diagram.
If you wish to use the form and did not enter Product information in the default
form on lesson 7, you must now populate the PRODUCTS table using the script
provided. You do this by choosing the Populate Tutorial Tables program from
the Designer/2000 Tutorial folder. if you are prompted to enter a username,
enter your username, password and database connection name in the following
format:
<username>/<password>@<connection_name>
You can now use the form to record priced products data on the database. You
will have noticed the thicker border. Notice also that the Product Id field is the
first in each record. Also that the Size Code field has a drop-down list.
You can save the data that you enter on the form by clicking the Save button on
the toolbar. You can close the form by selecting Action → Exit.
Close the module diagram in the Design Editor, but leave the Design Editor
open for the next lesson.
Objective
To implement part of the Speedy Pizza system as a Web application.
2. Select the Oracle option button and enter the connection details if these are not
already shown.
3. Click the Start button.
The Design Editor message window is opened, through which progress is
reported.
7. Enter TUTORI0060 in the New Short Name box and select Oracle WebServer
from the New Language drop-down list, then click the OK button. The new
module is listed in the Navigator.
8. Create a module diagram for the TUTORI0060 module.
9. Allow Insert as an operation for all of the items in the Products lookup table.
One way of doing this as follows. Open the Property Palette for one of the items
(e.g., DISCOUNT_DAY). Highlight all the lookup items on the diagram (i.e.,
DISCOUNT_DAY, PRODUCT_DESCRIPTION, PRODUCT_ID,
PRODUCT_TYPE). In the Operations section of the Property Palette, change the
Insert? value to Yes. Click the Save button on the Property Palette toolbar.
10. Select Options → Generator Options → WebServer and use the connection
information supplied by your System Administrator to complete the dialog.
Check the "Auto-install after Generation" check box. For a full description of the
details to be entered into the Options dialog box, click the Help button. Click the
OK button to save the information and close the dialog box.
15. Highlight "Run generated application using browser..." and click the Run
button.
Your browser executable is opened and the generated application is shown.
Click on one of the active Product Ids in the List Of Values table to add it to the
Priced Products page. Fill in the other fields to describe the new menu item,
then click the Insert button to create the record.
Lesson summary
In this lesson you created module TUTORI0060 and implemented it as a WebServer
application.
This lesson describes what you must do after completing the tutorial.
Instructions
1. Close any Designer/2000 tools you might have open.
2. Select File → Exit to close the Designer/2000 window.
This appendix is intended for Repository Managers who are responsible for
enabling users to follow the Designer/2000 tutorial. This appendix explains how to
import the TUTORIAL application system. For information purposes only, this
appendix also lists the files installed by the Oracle Installer, and describes what
users have to do before starting the tutorial. The sections in this appendix are:
■ importing the TUTORIAL application system
■ setting up for WebServer Generator users
■ what the Oracle Installer installs on the client
■ how tutorial users are instructed to start the tutorial
Click the Open button to close the Select XT Archive Import File dialog box
7. Ensure that tutapsys.dmp is specified in the Import File box, then click on the
Import button to begin the import.
If the current user has not imported or exported an application system before,
you will be prompted to create the archive tables before the file is imported.
Click on OK to accept the default tablespaces for tables and indexes.
If the archive tables already exist but are not empty, you will be prompted to
delete existing data before continuing. Click on OK.
8. If you want to change the name that the application system will be given in your
repository, type the new name in the New Name field.
æ æ æ æ æ
7. Click on the Grant button to grant the tutorial user access to the TUTORIAL
application system with the specified access rights.
8. Click on Close to close the Application - Grant Access by Application dialog
box.
tutorial.fmb tutorial.olb