Re: One-To-One Relationships

From: rpost <>
Date: Sat, 01 Dec 2007 17:52:47 +0100
Message-ID: <ad9e1$4751915f$839b4533$>

Bob Badour wrote:

>> [...] The distinction between entities and
>> relationships: entities have identity (they can be referred to; attributes
>> can have entity-valued domains), while relationships do not (they are
>> completely identified by their, possibly entity-valued, attributes).
>Except that relationships have identities too.

By (my) definition, they do not.

>The identity of the
>relationship between an employer and an employee, for example, is a
>contract. The relationship between a mother and a child, for example, is
>the event of birth. etc.

You're ignoring Chen's main point.

From the perspective of relational modelling, there is no other way of dealing with identity than the way you're using here: you point out the identifying attribute(s) of a relation. That's fine if you (1) know what these attributes are and (2) know they won't change over time. ER modelling allows me to assert the identifiability of a relationship *without* reference to identifying attributes. That is very useful, e.g. in conceptual modelling, when you haven't detailed your attributes; or in cases where you just don't want to make the identifying attributes part of your model (I may well keep information about employment relationships without knowing any details about the contracts).


>> This is the exact problem Chen identified. In the relational model
>> it is impossible to have entity-valued attributes, which, in practice,
>> we have a huge amount of.
>Entities are figments of our imaginations.

Heh. So are relations, attributes, values, and domains. So are rectangles, straight lines, points, and angles. So are "real" numbers, functions, and differential equations. But they all work pretty well.

We're dealing with conceptual modelling here. I prefer the term 'modelling constructs', if you don't mind.

I agree with Chen (and e.g. OO design, which takes it to another extreme) that a notion of entity is natural, unproblematic and well worth having.

You apparently disagree. Make me understand why. Be specific. I know this has been discussed here before, but I wasn't there and Googling the archive didn't help me much. Pointers to good explanations will be much appreciated.

Does recognizing the meaningfulness of entities give us, as Chen's paper claimed, a full-blown alternative to relational modelling? Not at all, if you ask me. We obtain a trivial variant of relational modelling, or maybe not even that: e.g. an entity can be formalized as a relation with a surrogate key. What matters is that, in conceptual modelling, entity sets (i.e. modelling constructs that, like relations, have attributes, but, unlike relations, have mutable elements that can be attribute values) are every bit as meaningful and useful as relations. That's all.

>> [...] When I say a particular person is the head
>> of a particular department, I do not mean to assert a relationship
>> between particular combinations of attribute values for departments
>> and persons; I may not even know what these attributes are.
>You are confusing yourself with nebulous terminology.

There's nothing nebulous about my terminology, at least not when I use it.

>(Exactly as Codd's
>quotes would predict.) A relation is a set of truth statements.

Statements about what? I want to make statements about persons, not about person names, birthdates, or ids. To be more exact: I want to make statements that consistently refer to persons even if the statements to describe persons are undetermined or variable.

Perhaps you have a way of non-1NF modelling in mind that allows me to do exactly that. In that case we have no disagreement except that you use terminology differently than I do.

>When I say a particular person is the head of a particular department,
>I make exactly such a truth statement.

Except that you, in a 1NF relational model, *cannot do so*, because your statement just cannot refer to a person or a department. You first need to identify, or invent, suitable properties, and make your statement about their values. It will be a different statement, and only equivalent as long as the properties you chose to base it on continue to actually identify the department and person in question.

I am not saying this is a big issue, an unresolved issue, or a very controversial one. Quite the contrary. But denying its existence isn't helpful, even if you want to convince people to stop using ER modelling, because by denying it, you ignore the reason people use ER models in the first place.

This is why I feel Codd's complaints, while largely justified, are ultimately misguided.

Received on Sat Dec 01 2007 - 17:52:47 CET

Original text of this message