CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Exploring a database with SQL enterprise manager's Diagram wizard

A picture says more than a thousand words. I received an existing database to be used in an application. The database is pretty complex: it has over 40 tables and there is not that much documentation. The diagram wizard in the SQL enterprise manager proved very usefulll to generate some diagrams which displayed quite clearly what the database was about.

When you create a new diagram in SQL manager a wizard pops up; it asks for a table to add to the diagram. The best part is the “Add related tables automaticaly” checkbox.

When checking that the wizard adds all all tables having a primary or foreign key relation with the selected table and fits them in a quite nice layout.

Impresive, but somewhat intimidating. You can set the number of levels you want to add. Raising this to two:

Wow ! All of this without any manual manipulation. Very very usefull

Peter


Published Jan 17 2005, 07:10 AM by pvanooijen
Filed under:

Comments

ben said:

I'm trying to include images in a blog post, but I'm not sure how to upload the images, can you tell me how you did it? thanks a lot!
# January 17, 2005 8:21 PM

Pris said:

Hi, I have a question....

I have a database from an ERP and I want to create de Driagram for this database but when I select the tables from the wizard the tables apears separated, there have no relation in the diagram, but I know there are tables which has to be related  ... do you know why it happens?

My data has 480 tables but the diagram doestn show any ralation between them...

I'll apprecite your help!

# February 21, 2008 8:37 PM

pvanooijen said:

The relations have to be defined in the DB in the form of foreign keys. In case these relations are only there in code, not as key defintions, the diagram will not show them. You kan use the diagram tool to create these keys by drag and drop.

# February 22, 2008 12:08 PM

pris said:

thaks for your help :)

# February 22, 2008 6:20 PM

Suvitha said:

hi kindly tell me the purpose or use behind the  'How many levels of related tables" selection ??

Thanks in advance

-Suvitha-

# September 17, 2008 2:19 AM

pvanooijen said:

That's the number of levels deep tables related to related tables (via foreign keys) will show up in the diagram.

# September 17, 2008 1:54 PM

neil may said:

I have used this info in the past to great affect but I now have a database with 310 tables and lots of relationships which is constantly fails to save, not only does it not save but it crashes sql 2000 enterprise manager. the error that comes up is as follows:

Runtime error

C:\Windows\System32\mmc.exe

Are there any limits on what can be saved within a diagram?

# September 23, 2008 6:51 AM

pvanooijen said:

Oh you poor man. .. Thatt's a horrfic db

Have you tried accessing the db from something like a 64 bit SQL 2005/8 manager ? AFAIK know that should be possible.

# October 2, 2008 2:48 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!

Our Sponsors

This Blog

Syndication

News