Is there a way to make sql show how the tables are related in an (ER) relationship graph in SQL? Thank s
|
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 |
|||
|
|
|
A google search took me to a product called SQLMaestro. I guess you were looking for something like in this screenshot. |
|||||
|
|
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. |
|||
|
|
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. :) |
|||
|
|