Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to make sql show how the tables are related in an (ER) relationship graph in SQL? Thank s

share|improve this question

There's the database diagram feature which seems to do what you want (unless you have some more specific requirements you haven't mentioned).

You can create one by going into your database in SQL Server Management Studio, right click on 'database diagrams' and select 'New Database Diagram'. You can then add your tables to the diagram and the relationships should show up.

There's a discussion of some alternatives here:

share|improve this answer

A google search took me to a product called SQLMaestro. I guess you were looking for something like in this screenshot.

share|improve this answer
yes, very similar, or something like this – user34683 Apr 6 '10 at 7:31
well, the screenshot I gave is of SQL Maestro...and that is the only MS SQL related product I know. phpMyAdmin has something similar but then myLittleAdmin and phpMSAdmin don't seem to have it :) – Knight Samar Apr 6 '10 at 7:43

If you have Visio 2007 Pro, there is a feature to reverse engineer an existing database - it will read your database and create a Visio chart with all of the tables and relationships mapped.

One caution when using it with SQL Server - I've always had problems using the SQL Server driver directly. Instead, I tend to have to use the "Generic OLE DB Provider" and then select the SQL Server OLE DB provider within that.

share|improve this answer
If you install the SQL Server 2000 driver it will read the database correctly, even with 2005+ – ConcernedOfTunbridgeWells Jul 4 '10 at 16:14

Or you can use mysql-workbench. It is a great tool which makes a reverse engineering of your database. You can download it on the mysql website. I think it works with any database. :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.