Managing Database Diagrams in Data View

You can open, save, copy, rename, and delete database diagrams from Data View. For each data connection, Data View displays any database diagrams that have been created for the database associated with the data connection. You can expand the Database Diagrams folder and see the tables included in each diagram.

Double-clicking a database diagram icon in Data View opens the diagram. Once you've opened a new or existing database diagram, you can drag tables and columns from Data View to add them to the diagram. You can then change the table's column properties, and define table relationships, indexes, and constraints.

To work with a database diagram in Data View

  1. Expand the Database Diagrams folder and select a diagram to work with or create a new diagram by right-clicking the Database Diagrams folder and choosing New Diagram from the shortcut menu.

  2. Right-click the name of the diagram and choose one of the following options.
    To Choose
    Open the selected diagram to view or edit it Open
    Create a new diagram and add it to your project New Diagram
    Create a duplicate of the selected diagram

    Note   Copying a diagram does not create a duplicate of the database objects in the diagram; it merely duplicates the references to those database objects.

    Microsoft® Visual Basic® does not support copying and pasting of database diagrams.

    Copy and Paste
    Remove the selected diagram from Data View and delete it from the dtproperties or MicrosoftDTProperties table in the database

    Note   Deleting a diagram does not affect the database objects or data that were contained in the deleted diagram; only the references to those objects are deleted.

    Delete
    Change the name of a diagram in Data View and in the dtproperties or MicrosoftDTProperties table in the database Rename. Type a new name for the diagram and press ENTER.

For more information about how you can use database diagrams, see Working in Database Diagrams.