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