Creating a Database Diagram

See Also

You can use a database diagram to create, edit, or delete database tables. You can also use a database diagram to see how your tables relate to each other. When you create a new database diagram, you are presented with a blank diagram surface to work on.

To create a database diagram

  1. Make sure you’re connected to the database whose tables you want to edit.

  2. In Data View, right-click the Database Diagrams folder and choose New Diagram from the shortcut menu.

    A blank database diagram appears.

  3. Add tables to the diagram by dragging a table or one of its columns into the diagram. When you release the mouse button, the table appears on your diagram and valid relationship lines to other tables in the diagram are automatically drawn.

    -or-

    Create a new table in the diagram by right-clicking anywhere inside the diagram and then choosing New Table from the shortcut menu.

    For more information see Adding Tables to a Database Diagram.

  4. Arrange the objects in your diagram. For more information, see Formatting a Database Diagram.

If you want to move objects to different parts of your diagram — for example, to align the tables or reduce the number of overlapping relationship lines — first select the objects, and then drag the selection to its new location.

If you select multiple tables, the relationship lines that connect them are automatically included in the selection.

If you select a relationship line, you can slide a line segment to a location that is parallel to its original position. If the relationship line has more than one segment, you can drag a corner diagonally to change both its vertical and horizontal position.

For an overview of the elements that you can edit in a table, see Working with Database Objects.