Create or edit an index in a Database Model diagram - Visio
Create or edit an index in a Database Model diagram
Visio Plan 2 Visio Professional 2019 Visio Professional 2016 More...
Indexes help your database system find and sort records faster. Creating indexes for columns that you search frequently can significantly improve the performance of your database.
You can create indexes manually, and you can modify the indexes that Visio automatically creates.
Note: The Database Model diagram is only available in certain versions of Visio. See Can't find the database modeling features? for more information.
Create an index in a database model diagram
Open the database model diagram.
Double-click the table to which you want to add an index, and then in the Database Properties window, in the Categories list, click Indexes.
Click New.
In the Create Index dialog box, type a name for the index, and then click OK.
In the Index Type list, select an option to create a unique or non-unique index.
In the Available Columns list, select the name of each column that you want to include in this index, and then click Add .
In the Indexed Columns list, select the Asc check box to create an index that has an ascending sort order, or clear the check box to create one that has a descending sort order.
The database model diagram is updated automatically.
Note: Some database applications have a limit on the type and number of indexes you can create per table. For specific information, see your database management system (DBMS) documentation.
Remove an index
Open the database model diagram.
Double-click the table that contains the index that you want to delete, and then in the Database Properties window, in the Categories list, click Indexes.
In the Index name list, select the name of the index you want to delete, and then click Delete.
The database model diagram is updated automatically.
Edit index properties
Open the database model diagram.
Double-click the table that contains the index that you want to edit, and then in the Database Properties window, in the Categories list, click Indexes.
In the Index Name list, select the name of the index you want to edit.
Edit the properties of the index by doing any of the following:
To specify a new name for the index, click Rename.
To specify a unique or non-unique index, choose an option in the Index type list.
To specify driver-specific index attributes, click Options.
The database model diagram is updated automatically.
Add, remove, or reorder columns in an index
Open the database model diagram.
Double-click the table that contains the index that you want to modify, and then in the Database Properties window, in the Categories list, click Indexes.
In the Index Name list, select the name of the index you want to modify.
Do one of the following:
To add a column to an index, under Available columns, select the name of the column, and then click Add.
To remove a column from an index, under Indexed columns, select the name of the column, and then click Remove.
To reorder a column, under Indexed Columns, select the name of the column, and then drag the column name to its new position in the list.
The database model diagram is updated automatically.
Can't find the database modeling features?
Visio Standard does not include the Database Model Diagram template.
Visio Professional and Premium editions support the reverse engineering features for the Database Model Diagram template (that is, using an existing database to create a model in Visio) but it does not support forward engineering (that is, using a Visio database model to generate SQL code).
Note: You can find the full suite of database modeling features, including both reverse engineering and forward engineering, in Visio for Enterprise Architects. Visio for Enterprise Architects is included in MSDN Premium Subscription, which is available with Visual Studio Professional and Visual Studio Team System role-based editions.
If you are using Visio Plan 2 and want to learn about how to engineer an existing database into a database model, see the topic, Reverse engineer an existing database.