Sunday, October 30, 2016

Database diagramming in SQL Server 2016

Database diagram is a diagram that consists of a number of tables displayed on it with or without showing the relationships between the tables. It can also be edited for logical relationships; get a print out of database structures, etc.

Here are steps to create database diagram in SQL Server 2016 for the AdventureWorks2014 database.

Click Database Diagrams under AdventureWorks 2014 which is presently empty as shown:


The top two items in the drop-down menu are

New Database Diagram
Install Database Diagram Support

Click on Install Database Diagram support. You get a message about objects missing that support diagram support.

Click Yes to go ahead and create objects to support diagramming. Nothing happens after you click Yes.

Click the Database Diagram node one more time. Now you get only one option - New Database Diagram.


Click New Database Diagram and a designer gets created bringing up a pick list of tables in the database as shown.


With CTRL key held down you can select multiple tables as shown.


After selecting table or tables click Add to add them to the diagram as shown.


If you try to close the diagram you will be asked to save it as shown.


Clicking Yes asks you for the name you want for this diagram. Provide a name and click OK.


You get a Save message a shown. You can save it in SSMS or save it to a text tile.


If you click Yes it gets saved to the server as shown in the Database Diagram node.


PowerShell Pro Tools is a Visual Studio Community 2017 extension that you can try free

I see there is at least one extension, PowerShell Pro Tools that you can download. You can find it in the Visual Studio Community 2017...