Chapter 3. Creating a relational Data Model

Table of Contents

Working with Tables
Creating New Tables
Modifying Tables
Copying Tables from external documents
Working with Columns
Creating New Columns
Modifying Columns
Moving Columns
Copy Columns from external documents
Working with Primary Keys
Working with Relationships
About Identifying and Non-Identifying Relationships
Creating Relationships
Modifying a Relationship
Working with Indices
Creating an Index
Modifying an Index
Deleting an Index
Working with Diagram Objects in the Playpen
Using Undo and Redo
Selecting Multiple Objects in the Playpen
Deleting Diagram Objects in the Playpen
Rearranging Diagram Objects in the Playpen
Automatically Arranging Tables in the Playpen
Straightening Diagram Lines in the Playpen
Using the Playpen Zoom Options
Finding and Replacing Playpen Objects
Printing or Exporting a Data Model Diagram

Use the Power*Architect playpen to create a data model diagram that includes tables, columns, indices, and relationships. Before you begin, be sure to read Chapter 2, Getting Started , which explains how to use the playpen and the database tree.

When you create a data model in Power*Architect, the model is saved in its own project. The project contains the data model diagram in the playpen and the database tree. You can have multiple projects (and therefore multiple data models) open in Power*Architect at once. Each project opens in a separate window.

Working with Tables

Creating New Tables

To create a new table:

  1. Click in the side toolbar. The cursor changes to a +.

    Note: To cancel creating a new table, press ESC.

    Alternate methods:

    • Right-click in the playpen, then click New Table.

    • Place the cursor over the playpen, then press T.

  2. Click in the playpen where you want to create the table. The Table Properties dialog box appears.

  3. Enter the following information:

    In this field ...

    Do this ...

    Table Name

    Enter a table name.

    Primary Key Name

    You cannot enter a primary key name until you have added columns to the table and defined the primary key. The primary key name is used when you forward engineer the data model. For more information, see the section called “Creating New Columns” .

    Note: Primary key names are not used when forward engineering to a MySQL database (MySQL does not support custom primary key names).

    Remarks

    Enter a description of the table. When you forward engineer the data model, the remarks will be included as comments in the database.

  4. Click OK.

Modifying Tables

To modify a table:

  • Click a table in the playpen, then click in the side toolbar.

    The Table Properties dialog box appears.

Alternate methods:

  • Right-click a table in the playpen, then click Table Properties.

  • Click a table in the playpen, then press Enter.

  • Modify the table properties as required. For a description of the properties, see the section called “Creating New Tables” .

  • Click OK.

Copying Tables from external documents

To copy tables from external documents (for example spreadsheets) into Power*Architect you can select & copy the table names from your external documents and paste (CTRL + V) them into the Playpen.