0797-0801

Previous Table of Contents Next

Page 797

Figure 32.7.
The Column Mappings
tab.



The Foreign Keys Tab

On the Foreign Keys tab, you can choose foreign keys to generate initially or foreign keys to regenerate. Existing foreign keys are automatically included here. You can remap attributes to existing foreign keys or add new foreign keys to the table. The keys will be included here if an entity is in the set. You can select a single key, however, without selecting the table. If the table does not exist, only the foreign keys selected will generate foreign keys in the table.

The Indexes Tab

On the Indexes tab, you can choose similar generation options for indexes. Here, you can remap relationships and unique IDs to existing indexes or add new indexes to the table. If an entity is in the set, the indexes will be included. You can select a single index without selecting the table. If the table does not exist, only the indexes selected will generate indexes in the table.

TIP
Foreign key columns will automatically have an index; however, it is sometimes better to wait until the issues resolving primary key and foreign key sequence order have been identified before generating the indexes.
The Run Options Tab

For each table definition generated, you can set the options for what types of objects to be created or modified. (See Figure 32.8.)

Tables
Columns

Page 798

Keys
Indexes

You may also elect to modify specific attribute information, such as

Datatype
Display Information
Names
Sequencing
Text
Volumetrics

Figure 32.8.
The Run Options tab.


The Options Tab

For each table definition generated, you can set the options for what data storage structures store the table. If you provide no information, the Database Design Wizard uses the defaults. If you give no table prefix, the wizard uses the short name of the entity. If you choose the Don't Commit option, the wizard validates your choices but does not generate the tables. For the first time through, choosing this option is a good idea to ensure that your selections generate properly.

Continuing to Generate

Once you are satisfied with all your choices, you can click the Start button. The Design Wizard Output window prompts you as it generates the definitions, letting you know what steps are taken. If your system is very large, this process might take some time. Any warnings (such

Page 799


as a table is missing for a foreign key) or errors (such as a table name is too long) display on-screen. Once the generation is complete, you are returned to the Table Options tab so you can continue additional generation or leave the tool. You are able to cut and paste the warnings to aid in resolution.

The Data Diagrammer

Use the Module Data Diagrammer and the Module Structure Diagrammer to create a physical model of the database. The physical model should be derived from the logical model through the use of the Database Design Wizard. This physical model is then used by the DDL Generator to generate the Data Definition Language (DLL) that is run to create tables, views, keys, indexes, roles, users, snapshots, databases, tablespaces, and so on. You'll also recognize many of the icon buttons from the diagrammers you used in the modeling process. With the exception of a few different toolbar icons, the interface in Figure 32.9 should look familiar.

Figure 32.9.
TheModule Data
Diagrammer.


Creating a Diagram

To create a diagram, you need to create summary information, add tables, link tables together with foreign keys, add views and snapshots if necessary, and save the diagram.

Summary Information

You can enter any summary information you want to display on the top of the diagram. To edit the summary information, choose File Summary Information.

Page 800

Adding Tables, Views, and Snapshots to the Diagram

If you used the Database Design Wizard, tables exist in RON. You could add tables into RON directly or through another database diagram. To select an existing table or view, select Edit Include. Select the table or view from the list available.

When you add a table to the diagram, any existing relationships to tables already on the diagram are also added.

Creating New Tables, Views, and Snapshots

You might want to create a table because you forgot an entity in your analysis so the table you need was not generated, or you might want to simply create your system starting at the design level. To create a new table, click the Table icon. Click where you want the table to appear on the diagram. The Data Diagrammer prompts you for a name, alias, and display title. To create a view, select the View icon. To create a snapshot, select the Snapshot icon.

Editing Tables

To edit a table, double-click within the confines of the table on the diagram. You see a set of tabs. The Table tab lists the information needed for generating the table. (See Figure 32.10.)

Figure 32.10.
The Table tab.



The Table tab lists the volumetrics and database definition information for the table. A DBA might request this information to aid in the creation of the database.

The Column Defn tab lists the definition information for columns. Any spaces in the attribute names are replaced with underlines. Here you can edit column names, sequence, datatype, length, and so on.

The Col Display tab lists the display information about a column. The information is used when table definitions are used in creating screen and report modules in the Application Generator. Whether or not an item should be displayed, the display type, the display length, and the display sequence are modifiable here.

Page 801

The Constraints tabs enable you to define keys and check constraints. You can define the names, columns, rules, and cardinality on these tabs. (See Figure 32.11.)

Figure 32.11.
TheConstraints tabs.


The Validation tab enables you to enter a valid list of values for a column as well as a failure message if the column is not filled with a valid item. (See Figure 32.12.)

Figure 32.12.
The Validation tab.


Editing Views

To edit a view, double-click the view on the diagram. You see a set of tabs. The tabs are very similar to the Table tabs, except for the Base Relations tab and the Base Cols tab. The Base Relations tab is where you add all the tables included in the view. You define their sequences and aliases here. The Base Cols tab is where you list the pseudo-columns within the included base relations tables. You define their aliases and sequences here.

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net