Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2003, 07:54 PM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default diagrams

if i have a db with no relationships specified between the tables and i pull a few tables into a diagram in enterprise manager, it's not possible that relationships will be generated is it?
 
Old June 27th, 2003, 08:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

If there are no relationships defined, how could it possibly know which columns are related to which columns in which tables?

You can easily set up the relationships in the diagram, though, by clicking on the primary key column in the primary key table and dragging to the foreign key column in a foreign key table. A dialog box will pop up asking you to verify the primary and foreign key columns in the two tables, along with a couple other attributes of the relationship to be set up.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old June 27th, 2003, 08:13 PM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i thought enterprise manager might have guessed because the primary and foreign keys that it connected in between those 2 tables were named the same, so i thought it may have assumed because they were named the same, no?
 
Old June 27th, 2003, 09:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well, just because they are named the same doesn't mean they are the same. I shudder to think how many tables I've seen where the primary key is named 'ID' and they have nothing to do with one another.

And it is more than reasonable that a foreign key constraint column could be named one thing in one table and quite another in the other table.

And even if the columns are referring to the same entity, it does not necessarily follow that you'd want the referential constraint always defined.

Such assumptions as you wish Enterprise Manager would make seem to me to potentially cause more trouble than they are worth, but that's just my opinion. In any case, EM doesn't do that. You have to define the foreign key relationships explicitly.



Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old June 28th, 2003, 01:50 AM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Vagiroy,

congratulations!!!!!! I must give you an award. That is the worse question I have ever, ever seen in an internet forum. EVER!!!!

Just out of curiousity, are you saying that because you don't know how to assign relationships, you want the server to assign relationships for you?
 
Old June 28th, 2003, 05:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

There is no call for you to insult the original poster like that. P2P is a place where people can come for help. The poster asked a question seeking help; your response was not helpful and in fact it was insulting, downright rude, and boorish.

If you can't contribute in a meaningful way then I suggest you find another outlet for yourself. Nobody cares what you think about the nature of the questions posted here.

I don't think that in a forum such as this that there is any such thing as a stupid question; there are however, apparently, stupid answers.


Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old June 28th, 2003, 01:39 PM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for clearing that up for me Jeff.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Diagrams? StreetSweaper BOOK: Professional C#, 2nd and 3rd Editions 6 June 8th, 2006 01:10 AM
Diagrams jbenson001 SQL Server 2000 3 March 31st, 2005 01:51 AM
Diagrams? StreetSweaper C# 2 January 4th, 2004 06:24 AM
Diagrams? StreetSweaper Access 1 January 4th, 2004 05:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.