Oracle Designer Tutorial


Prev Next

Lesson 5
Refine the default database design

The database design created by the Database Design Transformer from the entity relationship model consists of a set of interrelated tables, columns and constraints. This is often referred to as the ‘first-cut database design’. The design objects that make up the first-cut database design can be represented on one or more server model diagrams and refined to a level ready for implementation.

After you have produced the first-cut database design, you can begin to make improvements to the design itself, and to establish defaults for how generated applications will use data. The process of amending and enriching the database design is one of the most important tasks in the application system development lifecycle.

The Design Editor, one of the Oracle Designer tools, enables you to model database designs on server model diagrams. Each server model diagram represents a collection of database objects that can be distributed physically between one or more databases. Using the Design Editor, you can add more information to the first-cut design produced by the Database Design Transformer.

During this lesson, you will refine the definition of tables that you created in the previous lesson.

Modify a default table definition

The Database Design Transformer has converted the entity relationship model into design-level table and constraint definitions held in the repository.

To prepare the default design for implementation, you now add extra information that was not relevant during the analysis phase of development.

Objective

To refine the definition of tables that you created in the previous lesson.

Instructions

  1. Click on the Design Editor button on the Oracle Designer Window to start the Design Editor.

    Design Editor button

  2. If the Welcome To The Design Editor dialog box opens, select the Server Model option, uncheck the Use A Guide and Open A Diagram boxes, and click the OK button.

  3. Click on the plus sign next to TUTORIAL (1), then Relational Table Definitions. This reveals the list of relational table definitions that were mapped from entities by the Database Design Transformer.

  4. Highlight all of the relational table definition names listed under Relational Table Definitions (CUSTOMERS, ITEMS, ORDERS, PRICED_PRODUCTS, PRODUCTS), then right-click on one of the highlighted names and choose Show On New Diagram.

    An alternative method is to drag and drop the relational table definition names into the blank area of the Design Editor window.

    A server model diagram is created in a separate window within the Design Editor. You may have to zoom out to see all of the diagram.

    server model diagram]

    Note that PRICED_PRODUCTS now has a primary key (PP_ID).

  5. On the server model diagram, select the diagram object representing the ORDERS table, then click the (create) Column button on the left side toolbar.

     Create Column button

    The following steps will add a column that could be used to record which user created the order. This is to familiarize you with the tool and will not be part of the form that you generate in later lessons.

  6. On the first line of the Fast Create Columns dialog box, type WHO in the Name column, select Yes in the Optional? column, then click OK.

    The new column name appears in the diagram object representing the ORDERS table.

    ORDERS table diagram object showing new column WHO

  7. Switch to using the property palette by choosing Optionsarrow.gif (182 bytes)Use Property Palette (this option may already be the current one).

  8. On the diagram object representing the ORDERS table, double click the A icon next to the name of the new column (WHO). You will see the column properties of the new column displayed in the Property Palette.

    properties palette for new column WHO

    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 are the text box and the drop-down box.

  9. Change the Maximum Length property to 20, then scroll down to AutoGen Type and change its value to "Created By".

  10. Save the data by clicking the Save button in the Property Palette toolbar.

    Save

Keep the Design Editor running, ready for the next lesson.


Lesson summary

In this lesson you used the Design Editor to refine the definition of tables that were created by the Database Design Transformer.



Next

Prev

Next

oracle.gif (1205 bytes) 
Copyright © 2000 Oracle Corporation.  
All Rights Reserved.