Re: Another view on analysis and ER

From: JOG <jog_at_cs.nott.ac.uk>
Date: Thu, 6 Dec 2007 02:29:53 -0800 (PST)
Message-ID: <33f63d64-b4f5-44ea-9c8c-79876cc5602e_at_o6g2000hsd.googlegroups.com>


On Dec 6, 4:33 am, David BL <davi..._at_iinet.net.au> wrote:
> On Dec 6, 10:47 am, JOG <j..._at_cs.nott.ac.uk> wrote:
>
> > Either we are crossing terminology, or this has already been
> > highlighted earlier in the thread with reference to marriages. E/R
> > forces one to pick a single conceptual viewpoint (marriage as
> > relationship/marriage as entity, etc), whereas a propositional
> > encoding is neutral on the topic.
>
> There is something I may be misunderstanding - can you put me right?

I'll certainly lend you my point of view. I offer no guarantees that its right :)

>
> I think an entity is characterised as something in the real world that
> we want to be able to reference using a reasonably small identifier.

I agree with the identification aspect, but see a small identifer as being an attractive quality as opposed to a definitional one.

> Typically an entity is subject to change over time, and we may not
> have convenient access to a nice, convenient, small number of
> measurable attributes that uniquely identifies it.

Sure. And if the identifier is a large unwieldy set of attributes for ease we might invent a surrogate to represent that set.

> Nevertheless we
> believe that the identifier can be used successfully in the real
> world. This could depend on the population statistics, such as the
> way we identify people around us by their facial characteristics, and
> it is helpful that people don't tend to have extensive plastic
> surgery, exchange body parts on a regular basis or cross dress. This
> allows them to be identified by names like "John".

I'm not sure I'm following this entirely David. "John" is just another attribute, and it can be used to refer to someone, but we know it wouldn't identify them uniquely. The reason we can get away with using it in day to day conversation is because humans are incredibly good at resolving context (whereas a computer is not). We'd only use someone's first name alone when we know its use will not be ambiguous.

>
> By contrast I think a relationship is characterised as only being
> identified by the entities that it relates.

Well, coupla things. Relationships can have attributes too, and they can be part of the identifying set. And second, the attributes of an entity... well why can't they too be entities? Consider a 'team' entity say. It could be identified by the players in it. And those players are all entities themselves right? Perhaps there is a formal distinction between relationships and entities but I'm yet to read one, so until then, I have to posit that there is no difference between them.

>
> Now I see the same distinction being made in a propositional
> encoding.

I'm not sure why - there are no entities in a propositional encoding, just roles and values.

>
> The intensional definition of the following predicate implicitly
> assumes Husband, Wife and Location correspond to entity types that can
> be identified using domain values. Evidently marriage is merely a
> relationship between them.
>
> married(Husband, Wife, Location) :- Husband married Wife at
> Location
>
> By contrast the following predicates are consistent with thinking of a
> marriage itself as an entity
>
> husband(MarriageId, Husband).
> wife(MarriageId, Wife).
> location(MarriageId, Location).
>
> or maybe just
>
> married(MarriageId, Husband, Wife, Location)

Summarizing the above I gathered that you are saying that: RELATIONSHIP: married(Husband, Wife, Location) ENTITY: married(MarriageId, Husband, Wife, Location)

So the only difference is that the entity has a marriageID? I am not clear why you think the addition of this surrogate would change a relationship into an entity!

>
> Now whether one "thinks in ER" or "thinks in propositional encodings",
> there has to be good reason to introduce a MarriageId.

I'm not clear at all why you have introduced a MarriageID. If the 'relationship' is identifiable by {H,W} say then so is the 'entity'. Why have you introduced the surrogate?

>
> Aren't you implying that a propositional encoding doesn't commit you
> to a decision about whether a marriage is implicitly or explicitly
> identified?

I certainly hope not ;) All things are identified by their attributes, so I don't really see this implicit/explicit split.

> I fail to see how that is possible.
Received on Thu Dec 06 2007 - 11:29:53 CET

Original text of this message