Use the Database Diagram to view a high-level, visual representation of an object and those objects which may be related to it. This helps you easily identify relationships between tables via foreign keys. You can use the Database Diagram to:
Understand the impact of changes.
Identify join predicates when writing complex queries for reports.
Understand the level of normalization of data when de-normalizing for performance or to save space.
Understand entity relationships so you can better use the data in applications or reports.
To diagram a relationship
Select Tools | Diagram.
Drag tables, views, or synonyms from the Object Explorer to the Database Diagram window. This method is useful if you want to add objects without setting the relationship types to display or the reference levels.
Note: You can also right-click an object in the Object or Database Explorer and select Send To | Database Diagram.
Drag a column from one object to a column in a second object where you want to create a relationship.
Notes:
This feature does not add new objects to the diagram if a relationship exists; it only displays relationships between objects already in the diagram.
A line between objects indicates an existing relationship.
A indicates the referencing table, and a
indicates the referenced table.
To reduce the number of columns that display in a large table, right-click the table and select Manage Hidden Columns. You can then hide any unnecessary columns to better understand the critical information.
Use the following Database Diagram toolbar buttons to assist you in creating a database diagram.
Toolbar Button | Description |
---|---|
|
Click to reorganize the objects in the diagram to make the relationships more visible. |
Click to resize each table in the diagram to show all columns. | |
Select the depth of relationships you want the Database Diagram tool to use when it includes related objects in the diagram. Set to 0 to display only the selected object (the parent object). | |
Click to view the object details for the object selected in the diagram (opens in a new pane). | |
Click to open all tables and views for the current database, plus any referenced objects from other databases. To limit objects to the current database, select All Tables and Views from Current Database Only from the drop-down list. |
Tips:
When opening a previously saved Database Diagram file, you can right-click the Diagram pane and select Refresh to get the latest objects from the database, including added/removed columns and data type updates.
An * in the title of the object indicates that the saved version differs from the database version.
© ALL RIGHTS RESERVED. Feedback 이용 약관 개인정보 보호정책 Cookie Preference Center