question

homebrew01 avatar image
homebrew01 asked

DB Diagrams - Dynamically Updated ?

If a database diagram has been created (2005), then there are changes made to foreign keys etc. Next time the diagram is opened, will it automatically include the changes ?
database-diagrams
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
I don't have a SQL Server installed and none to connect to (this is a truly strange and scary feeling, but has to do with me reinstalling my at-home-server) but I would imagine a foreign key that is created, relating two tables already in the diagram would show up next time you open the diagram. Why don't you try it? Go to AdventureWorks, Pubs or even TempDB. CREATE TABLE t1 (id int identity(1,1) primary key, f varchar(10)) CREATE TABLE t2(id int identity(1,1) primary key, t1_id int) Create a new diagram with the two tables, save it and close it. Do ALTER TABLE t2 ADD CONSTRAINT FK_t1_t2 FOREIGN KEY (t1_id) REFERENCES t1(id) Open the diagram again. Did the relation show up? Like said - if I had a SQL Server around I'd check it myself.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
Yes, it absolutely will. I tested it several different ways and the tables automatically update.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.