Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIQUE CONSTRAINT

Status
Not open for further replies.

cperez

Programmer
Nov 12, 2002
1
0
0
FR
Hi all,

I am a beginner with PD9.

I would like to know if it is possible to modelize the SQL UNIQUE constraint in the models (conceptual and physical) ?



My database will be on MySQL 3.23

thanks for your help.

Bye
 
Hello .

Looking in the database definition file - DBMS -> edit curent dbms

I have found this for alternate keys

unique (%COLUMNS%)

Is this what you wanted?

----------------------------
An alternate key is made up of one or more columns whose values uniquely identify every row in the table, and is not a primary key. An alternate key can also be a foreign key. Each alternate key can generate a unique index or a unique constraint in a target database.

¨ To designate an alternate key:

1 Double-click a table in the diagram.

The property sheet for the table appears.

2 Click the Keys tab.

The Keys page appears. It lists keys defined for the table.

3 Click a blank line in the list.

or

Click the Add a Row tool.

An arrow appears at the beginning of the line.

4 Type a key name and a key code.

Alternate key naming convention
The naming convention for an alternate key is AK followed by the number of the key column code; for example AK1_CUSNAME.

5 <optional> Type a constraint name in the Constraint Name column.

If you do not specify a constraint name, PowerDesigner creates a default constraint name automatically.

Display the column you need
If you don't see the column you need, display it with the Customize Columns and Filter tool. See the Defining a filter on a list section in the General Features Guide.

6 Click Apply.

The constraint name and code are committed.

7 Click the new key name.

An arrow appears at the beginning of the line.

8 Click the Properties tool.

The property sheet for the new key appears.

9 Click the columns tab.

The columns page appears. It lists all columns defined for the key. At key creation, the list is empty.

10 Click the Add Columns tool.

A list of columns, defined for the table appears. This list does not include primary key columns.

11 Select check boxes for one or more columns that you want to designate as alternate key columns.
12 Click OK in each of the dialog boxes.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top