You are here: Re: Table design request for comment. (Help please) « MsSQL Server « IT news, forums, messages
Re: Table design request for comment. (Help please)

Posted by Erland Sommarskog on 07/14/06 22:25

Mark (mark.rullo@gmail.com) writes:

> Hi there gurus, can you please add your 2 cents on this design? We're
> having trouble relating these tables in a diagram because of the keys.
> Is it necesary to have the references setup? I would assume yes so the
> forign keys can be setup.
>
> If you look at this link, you'll see our diagram. In Red are the
> relationships that we would like to make for referential integrity, but
> cannot because of the keys.
> http://rullo.ca/linktome/QuestionsDB.jpg

It's not clear from the diagram, in which direction you want the relation
to go. If my guess is right, you need to add QuestionGroupID to the tables
QuestionAnswerName and QuestionNames. Really what QuestionAnswer relates
to is not clear. When I think of it, maybe QuestionAnswer should have an
FK to QuestionGroupDetails, and thus also have a QuestionGroupID. And
QuestionAnswerName should relate to QuestionAnswer, not
QuestionGroupDetails.

> -Q1| QNameID = 1 | "-French - Do you have a chien in your appartment?"
>| LangID = 2(fr)

"Est-ce que vous avez un chien dans votre appartement?" :-)

> The difficulty is when we try and put this in the group details table.
> We don't want to outline the Language, we'd just pass the language into
> a proc to retreive a specific group with a specific language. If you
> folks would be so kind as to add your comments to the design I would be
> truely grateful.

I fail to see what the proc has to do with the data model.


And next time, please do not post the same question independently to
multiple newsgroups.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация