Generate table relationship diagram from existing schema (SQL Server)

417,890

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?

Share:
417,890

Related videos on Youtube

Nick Zalutskiy
Author by

Nick Zalutskiy

Updated on January 22, 2020

Comments

  • Nick Zalutskiy
    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.

  • Dave Stein
    Dave Stein about 15 years
    Any way to do this with SQL Server Compact 3.5?
  • davidtbernal
    davidtbernal over 13 years
    This was very easy to set up, and produced a much more readable diagram than the SQL Server tools do. +1
  • Piotr Kula
    Piotr Kula almost 12 years
    It is not always available.. some versions of SSMS and SQL do not allow of due to licensing.
  • Kjell-Åke Gafvelin
    Kjell-Åke Gafvelin about 11 years
    This feature has unfortunately been removed in Visio 2013.
  • Ivan
    Ivan about 11 years
    It doesn't seem to support DBMSes other than MySQL any more. Also, its diagram auto-layout is dreadful.
  • dendini
    dendini about 11 years
    the 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
    Ivan about 11 years
    "Foreign key relationships are inferred, using naming conventions" - totally inapplicable for in the most of real business cases.
  • Ivan
    Ivan about 11 years
    Doesn'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
    Ivan about 11 years
    The 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
    ruffin about 10 years
    Very easy to set up iff you're already running JDBC. Otherwise potentially in all to familiar config heck.
  • Olayinka
    Olayinka about 10 years
    +∞ for this. life saver!
  • Andrea Scarcella
    Andrea Scarcella almost 6 years
    Tried this in July 2018, it still works wonders and it is still free! +1
  • Phil Hord
    Phil Hord almost 6 years
    Works nicely if you have proper foreign key relationships.
  • Phil Hord
    Phil Hord almost 6 years
    You'd be surprised how often this is needed.
  • Vishwas S L
    Vishwas S L almost 6 years
    One should be able to see all the existing relationships as well once you add all the necessary tables.
  • Maytham Fahmi
    Maytham Fahmi over 5 years
    In 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
    Harvey Darvey over 5 years
    When 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
    R. Schreurs over 4 years
    This link now redirects to the home page: solyp.com. Seems deprecated.
  • helvete
    helvete over 4 years
    Or you can, you know be on GNU/LInux or Macos actually without any license, just with connection credentials.