Re: semantics of foreign keys: domain specific inequality?

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Sun, 31 Dec 2006 16:16:32 +0200
Message-ID: <Pine.SOL.4.62.0612311558180.23473_at_kruuna.helsinki.fi>


On 2006-12-30, falcon wrote:

> After all that, my question is, how can one deal with situations where
> some database entities need to be 'second-class citizens.'

The way you deal with any data. At the relational level it makes no difference.

> Is there any published material related to this problem?

Yes. In the entity-relationship paradigm, this is treated under the heading of weak entities, or weak entity sets. Object folks have the same concept in UML's composition and containment concepts. Google will give you plenty of references.

> Is it enough hide a second-class citizen in all cases except when it
> is being accessed (read, deleted, updated, inserted into) as part of
> its related first-class citizen?

You might want to update weak entities as part of their owners, but I don't think you'd want to hide them. I mean, they are going to contain useful information that can be queried without utilizing the ownership relation. Hiding that would serve no purpose.

-- 
Sampo Syreeni, aka decoy - mailto:decoy_at_iki.fi, tel:+358-50-5756111
student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
openpgp: 050985C2/025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Received on Sun Dec 31 2006 - 15:16:32 CET

Original text of this message