cancel
Showing results for 
Search instead for 
Did you mean: 

How do i need to create index in a table?Is there any naming convention? If there are non unique indexes, how to include them in a table?

former_member248088
Participant
0 Kudos

How do i need to create index in a table?Is there any naming convention? If there are non unique indexes, how to include them in a table?

Accepted Solutions (1)

Accepted Solutions (1)

former_member200945
Contributor
0 Kudos

The best way to study how to create database object in Powerdesigner is using

existing SQL code to run reverse engineer, generate PDM. Examine the PDM.

For example, i have the following code for SQL Server 2014

CREATE TABLE Customers

(

  ID                                    NOT NULL,

   Name   Varchar(20)       NOT NULL,

   Address  Varchar(200)   NOT NULL

)

go

--Create a non-unique no clustered index on the clustered table

CREATE NONCLUSTERED INDEX idx_NonUniqueNCI_ID

on Customers(Name)

go

Save the code in a file.

Then go to File->Reverse engineer->Database. Select SQL Server 2014 as DBMS. Click OK

Check Use Script File. Browse to above file. Click OK.

After reverse engineer is done, bring up table Customers property, go to Index tab.

Study the object has been created. Try create your own index.

Then go to Tools->Model Options->Naming Conversions. Check Enable Conversion.

If you want to use naming conversion for index, select Index. Click Name to Code or Code to Name tab.

Select a conversion table

Answers (0)