Generate table relationship diagram from existing schema (SQL Server)
Solution 1
Yes you can use SQL Server 2008 itself but you need to install SQL Server Management Studio Express (if not installed ) . Just right Click on Database Diagrams and create new diagram. Select the exisiting tables and if you have specified the references in your tables properly. You will be able to see the complete diagram of selected tables. For further reference see Getting started with SQL Server database diagrams
Solution 2
Try DBVis - download at https://www.dbvis.com/download - there is a pro version (not needed) and a open version that should suffice.
All you have to do is to get the right JDBC - database driver for SQL Server, the tool shows tables and references orthogonal, hierarchical, in a circle ;-) etc. just by pressing one single button. I use the free version for years now.
Solution 3
SQLDeveloper can do this.
http://sqldeveloper.solyp.com/
Solution 4
For SQL statements you can try reverse snowflakes. You can join at sourceforge or the demo site at http://snowflakejoins.com/.
Solution 5
Why don't you just use the database diagram functionality built into SQL Server?
Related videos on Youtube
Nick Zalutskiy
Updated on January 22, 2020Comments
-
Nick Zalutskiy over 4 years
Is there a way to produce a diagram showing existing tables and their relationships given a connection to a database?
This is for SQL Server 2008 Express Edition.
-
kmonsoor over 8 yearsa free tool named SchemaSpy can do that like charm. But, needs a little setup. I have detailed the step here: blog.kmonsoor.com/generate-er-diagram-from-sql-database
-
George Birbilis over 4 yearsnice one: 60 DB Reverse engineering tools (see filter on the left) - dbmstools.com/categories/database-diagram-tools/sqlserver
-
-
Dave Stein about 15 yearsAny way to do this with SQL Server Compact 3.5?
-
davidtbernal over 13 yearsThis was very easy to set up, and produced a much more readable diagram than the SQL Server tools do. +1
-
Piotr Kula almost 12 yearsIt is not always available.. some versions of SSMS and SQL do not allow of due to licensing.
-
Kjell-Åke Gafvelin about 11 yearsThis feature has unfortunately been removed in Visio 2013.
-
Ivan about 11 yearsIt doesn't seem to support DBMSes other than MySQL any more. Also, its diagram auto-layout is dreadful.
-
dendini about 11 yearsthe auto layout simply stacks everything on top of another, you must then drag each table to the appropriate position, it might be dreadful but I doubt any algorithm would be smart enough to order everything neatly. As for SQL support I use it with H2 server queries and it works, I think they support most SQL-92 compliant SQL so if your code doesn't comply to SQL-92 it might be a good occasion to check it.
-
Ivan about 11 years"Foreign key relationships are inferred, using naming conventions" - totally inapplicable for in the most of real business cases.
-
Ivan about 11 yearsDoesn't do the task (visualizing the database schema) but is still pretty cool though. I wish there were something like this to generate a tidy diagram of a computer network from a textual description...
-
Ivan about 11 yearsThe incompatibilities lie everywhere from very basic things like quotes/brackets usage to huge differences in DDL (tables/keys/constraints/indices definition language) and fundamental differences in types (like using a separate type for Unicode strings).
-
ruffin about 10 yearsVery easy to set up iff you're already running JDBC. Otherwise potentially in all to familiar config heck.
-
Olayinka about 10 years+∞ for this. life saver!
-
Andrea Scarcella almost 6 yearsTried this in July 2018, it still works wonders and it is still free! +1
-
Phil Hord almost 6 yearsWorks nicely if you have proper foreign key relationships.
-
Phil Hord almost 6 yearsYou'd be surprised how often this is needed.
-
Vishwas S L almost 6 yearsOne should be able to see all the existing relationships as well once you add all the necessary tables.
-
Maytham Fahmi over 5 yearsIn addition to this answer; if you face connection problem check this dba.stackexchange.com/questions/62165/… the. The other JDBC info dbvis.com/features/sqlserver-database-drivers and for updated JDBC driver look at this microsoft.com/en-us/download/details.aspx?id=57175
-
Harvey Darvey over 5 yearsWhen specifying the Database port, I used the Dynamic Port of the sql server instead. The regular port 1433 does not work for me.
-
R. Schreurs over 4 yearsThis link now redirects to the home page: solyp.com. Seems deprecated.
-
helvete over 4 yearsOr you can, you know be on GNU/LInux or Macos actually without any license, just with connection credentials.