You are here: Re: One-to-many with a twist « MsSQL Server « IT news, forums, messages
Re: One-to-many with a twist

Posted by Erland Sommarskog on 06/01/05 13:34

Gert-Jan Strik (sorry@toomuchspamalready.nl) writes:
> Maybe the addresses you are using are never shared, but (unless this is
> a business rule), this is purely coincidental. An address is an entity.
> And with a foreign key relation you can specify that a publisher or an
> agency has an address. It is not even uncommon to have several such
> relations between two entities. For example, a publisher could have a
> billing address and a shipping address. That would mean two
> relationships to (potentially) the same address.

Good point. For instance, in our database we have a table
"customeraddresses", which thus permits a customer to have several
addresses. This connection table then contains flags to mark addresses
with certain properties.

Then again, for other entities we only have room for one single address.
Exactly how this looks like, depends on the business rules.


It's also interesting to note that an address simply have nothing which
is anywhere close to a natural key.

--
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

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