views:

151

answers:

4

Can you create a database diagram for a database and save it without creating the actual tables? You know, so the boss can check it out before you apply it?

+2  A: 

No. The database diagram is somewhat confusingly named in that it is basically a table designer not just a pictorial representation of the database.

Saving the diagram will persist all changes to the underlying database objects.

Martin Smith
That sucks...Do you know of a program that will do the same thing with the capability to print off the organization of tables? For lack of a better term, I am trying to create a "report" to show the higher ups how the DB goes together...Forgive, I am not a DBA!
ThaKidd
Do you have access to Visio? If not maybe set up a copy of the database structure in a new database that you can mess around with so that it doesn't matter if you save changes.
Martin Smith
Visio it is then m8s...danke!
ThaKidd
+2  A: 

No, but why don't you print it out and show it to your boss like that

ideally you have a dev version of the database where you make changes and this won't impact anything

SQLMenace
Good point...however, I like the Visio option!
ThaKidd
+2  A: 

Not if you're setting keys/relationships. When you make those connections in the diagram, SSMS establishes the keys/constraints as well.

If your boss wants to look at a diagram before you make the changes, I would suggest Visio or some other visualization tool. You can provide the same information (albiet with a little extra effort) and it doesn't mess with the DB itself. Addtionally, you'd then have a "database diagram" which was disconnected from the DB, so if you wanted to make future changes, you could move things around with impunity until you got your connections/relationships just the way you want them.

AllenG
A: 

You could use a tool like SQL Dependency Tracker to visualise your database, or you could just make a copy of your database schema and save your databse diagram in SSMS on the copy if you don't want to apply them to the original instance.

David Atkinson