Database diagrams

Is there a way to create database diagrams from selected number of tables, For example If I need to create the relationship between 5 tables out of 70 in the database ?

yes you can, if you are using SSMS, simply go to the database diagrams folder, and create a new one, select the 5 tables you wanted to include and you can drag and drop them to show the layout.

1 Like

Yes, I have got all the table layout, Is there a way to draw the relationships between them ?

surely, if you drag some of the column from 1 table to another, it will then create the FK for you. I believe that is what you are looking for?

No, the tables are already existing and defined, I do not want to change the relationship
I want to see the existing relationship between the tables

You need to install SQL Server Management Studio Express (if not installed ) .

  1. Just right Click on Database Diagrams and create new diagram.
  2. Select the existing tables and if you have specified the references in your tables properly.
  3. You will be able to see the complete diagram of selected tables.

For further reference see:

Getting started with SQL Server Database Diagrams

1 Like