You are here: Re: One-One Relationship « MsSQL Server « IT news, forums, messages
Re: One-One Relationship

Posted by Erland Sommarskog on 10/11/05 00:40

Tom (nospam@yahoo.com) writes:
> Do you guys know what's wrong with a one-to-one relationship?
>
> The reason I want to make it like this is that at the very end of the
> chain, the set of keys is huge. I want to limit the number of columns
> to be the key. i.e. the [company] table has 1 column as the key. The
> [employee] table will have 2 columns as the key.

And? I don't really understand where you're heading. Yes, you could
invent a superclass called entities, and make everything a heir of
that. Which maybe could make sense for some business problems, but
certainly not all. After all, you are in a relational database, not an
object-oriented one.

And I am not really sure what you mean with one-to-one relationship.
I would take that to mean that for every A there is always a B and
vice versa. I could think of having such a pair of tables if the
set of attributes for an item is huge, and some of them are referenced
far more often than others. But it does not seem like it's that you
are talking about. After all, most companies have more than one employee.


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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

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

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