How to create a database diagram from a SQL Server database
Last modified: October 1, 2024
A SQL Server database diagram graphically represents a relational model of a SQL Server database. With the Database Diagram Design tool, you can drag database objects from Database Explorer to the diagram and perform the following tasks:
- Create or modify relations between database objects
- Add, rename, or remove columns
- Add, modify, rename, or remove indexes, keys, constraints, and triggers
- Create containers to store logically related objects
- Navigate between tables and their relations on a database diagram
Create a SQL Server database diagram
To create a database diagram, perform the steps:
-
Use either of the following options:
- On the File menu, select New and then click Database Diagram
- On the Database menu, click Database Diagram
- On the Start Page > Database Design dashboard, click New Database Diagram
-
To add database objects to the diagram, use either of the following options:
-
Drag database objects from Database Explorer to the diagram.
-
In Database Explorer, right-click a database object and select Send to > Database Diagram on the shortcut menu.
-
On the diagram toolbar, click the database object you want to create.
-
-
Optional: To layout a diagram for a more convenient view, right-click on the diagram and select Layout Diagram on the shortcut menu.
-or-
On the Layout toolbar, select Layout Diagram.
-or-
Set the diagram layout manually by dragging shapes and moving the relations. For more information about how to arrange shapes and layout, see Diagram Shapes and Layout and Organizing Diagram Shapes with Containers.
-
On the Diagram toolbar, click
New Stamp to add a stamp to the diagram to display company and project names, diagram author, version, date, and copyright. To edit stamp fields, double-click them and enter values.
You can also add notes, a new database object, a container, an image either from the shortcut menu of the diagram or from the Diagram toolbar. For more information about other elements you can add to the diagram, see Additional Elements on a Diagram.
-
Save the changes.
Navigate through the diagram
To navigate through the diagram, do the following:
- Use the scrollbars
- Move the mouse while holding the middle mouse button
- Search diagram shapes.
- Use the Document Outline window. It contains nodes, representing all shapes on the diagram. They are grouped by containers and by object kinds. Stamps and notes are placed to the Notes kind. Table nodes contain their relations.
- Use the Diagram Overview window.
To display the Diagram Overview window:
- On the Diagram toolbar, click
Diagram Overview.
-or-
- On the View menu, click Other Windows, and then click Diagram Overview, or press CTRL+W, V. In the Diagram Overview window, drag square visible area with the mouse.
You can zoom in and out the diagram to simplify the navigation. To quickly move to the area you need, on the Diagram toolbar, click Fit, then hold CTRL+SHIFT and select the area you need with mouse pointer.
Download a 30-day free trial of dbForge Studio for SQL Server and see all of its rich capabilities for yourself!
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.