Adding Columns to a Table
You can add columns to an existing table or define columns for a new shape in the Database
Properties window. When you add a
column to a table, you can define it as the primary key. If you're
using Relational notation, primary, alternate, and foreign keys are visible on the table, as
shows. Visio Professional 2007 automatically creates unique indexes on primary keys. Other columns
can be assigned a non-unique index called the inversion key.
Figure 19-16. OfficeLoc is the primary key (PK); StreetAddress, IsHeadquarters, and Countryname
are required values and appear in bold. PostCode, StateCode, and CityName are unique indexed
Before you start adding columns, you might want to define a default naming convention. Visio
Professional 2007 generates default names for columns, primary keys, foreign keys, and other
attributes based on a prefix and suffix specified in the Database Modeling Preferences dialog box. For
example, if you add a new column to the Orders table, Visio Professional 2007 provides the name
OrdersCol1. To specify default names, choose Database, Options, Modeling, and then change the
settings on the Logical Misc tab.
Follow these steps to add a column and define its properties:
Right-click the table to which you want to add a column, and then choose Database Properties.
In the Categories box, choose Columns, and then click Add
To create a primary key, place a check mark in the PK column.
To define the column's attributes, click Edit.