Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-05-24 : 19:41:19
|
| Hello,after creating relationships between tables using T-SQL is it possible to visually see them in Management Studio?Thanks,Miguel |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-05-24 : 19:56:49
|
you can create a database diagram. have a look at the "database diagrams" node under the database node in object explorer. www.elsasoft.org |
 |
|
|
LukeD
Starting Member
5 Posts |
Posted - 2011-06-08 : 06:04:44
|
| My diagram shows tables but no relationships, why?I wish to create a diagram of some tables and their relationships that exist within my database. I am concerned that doing so on the 'live DB' will disturb the data somehow. As a precaution I copied several tables from my 'live DB' into a 'test DB' and hoped to map them. Unfortunately when trying to create a diagram within my testDB using the copied tables there are no relationships depicted, simply the tables. These tables are system generated, so could it be possible that no relationships exist?Can you only create database diagrams using 'live' i.e. uncopied tables? |
 |
|
|
LukeD
Starting Member
5 Posts |
Posted - 2011-07-22 : 04:27:19
|
| Anybody have input? |
 |
|
|
sfortner
Yak Posting Veteran
63 Posts |
Posted - 2011-07-22 : 13:32:56
|
| You can right-click the table, click Design, right-click anywhere on the tab that is displayed, then choose Relationships. You can also manage the relationships here as well (i.e., add/change/delete them).EDIT: I typically don't use the diagrams in SSMS (I've used Enterprise Architect previously for ERDs) since it's kind of cheesy, but I just tested it and if there's a relationship on the table added to a diagram, it automatically includes the relationship.--Steve |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2011-07-23 : 01:19:22
|
do your tables have foreign keys? if not then you won't see any relationships. elsasoft.org |
 |
|
|
|
|
|