Database Diagram Window
See Also Tasks
The Database Diagram window presents a graphic display of the tables and relationships in your database.
In the Database Diagram window, you can:
-
Add tables to the database diagram by dragging them from the tables folder.
-
Remove tables from the diagram or delete them from the database.
-
Save selected tables, or the entire database diagram.
-
Create, edit, or delete relationships between tables.
-
Create, edit, or delete tables and table column definitions.
-
Open the property pages to edit objects shown in the diagram, or to create, edit, or delete database objects, such as indexes and constraints, that are not graphically represented in the diagram:
-
Lay out the objects shown in the diagram by changing the table view. Five pre-defined table views are available as shown below. For more information, see Changing a Table View.
-
Change the arrangement of the objects in the database diagram by automatically arranging the tables, expanding and collapsing the tables by changing the column view, and by rearranging relationship lines. For more information, see Formatting a Database Diagram.
When you save a database diagram, the database is updated to match your diagram. The diagram is saved in your project directory and shown in the Database Diagrams folder in Data View. The diagram is also saved in the dtproperties
or MicrosoftDTProperties
table of your database.
Before you save a diagram, you can view an SQL change script to see the SQL statements that will be applied to the database when you save the diagram. If you close a diagram without saving it, the underlying database remains unchanged.
For more information about database diagrams, see Working in Database Diagrams.