Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

4 Answers 4

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:

http://msdn.microsoft.com/en-us/library/aa224825(SQL.80).aspx?ppud=4

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 img215.imageshack.us/img215/3432/50004031.jpg –  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.

http://office.microsoft.com/en-us/visio/HA101154851033.aspx?pid=CH100648911033

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

 
discard

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.