Re: What is a Relationship !?

From: Tom Hester <tom_at_metadata.com>
Date: Thu, 20 Nov 2003 11:59:56 -0800
Message-ID: <1cdad$3fbd1d40$45033832$12561_at_msgid.meganewsservers.com>


"Lauri Pietarinen" <lauri.pietarinen_at_atbusiness.com> wrote in message news:bpj3us$ebb$1_at_nyytiset.pp.htv.fi...
>
> >An entity is an object that exists and is distinguishable from other
> >objects. For instance, John Harris with S.I.N. 890-12-3456 is an entity,
as
> >he can be uniquely identified as one particular person in the universe.
> >
> >This is a pretty common notion. An entity exists in the real world and
has
> >a unique identifier. A relationship on the other hand is some subset of
the
> >power set of entities, or as DSS defines it: A relationship is an
> >association between several entities.
> >
> >Typically, relationships are identified by the identifiers of the
entities
> >that fill key roles in the relationship, not by any unique identifier of
> >their own. However, relationships do often have additional attributes
over
> >and above their member attributes.
> >
> By that definition most of the relations in a database could be
> classified as relationships, I guess...
No, first of all; there is the question of levels of abstraction. I suppose that you mean that the relations in a database model or describe a relation? But in fact, some will describe entities and some relationships or they may in fact not describe either or describe only parts of either. It depends on how the modeling was done, among other things.
> And, further, a relationship could become an entity just by giving it a
> unique identifier.
No, it also must exist in the domain of discourse. Admittedly a squishy concept but one that is common in modeling--both data modeling and logical modeling.
>
> Take for example
>
> person(person_id, person_name, etc...)
Looks like an entity.
> company(company_id, company_name, etc...)
Looks like an entity.
> job(person_id, company_id, etc...) //current job(s) of person
>
> Now would 'job' be an entity or a relationship?
Job would be a relationship.
>
> What if I add start_date?
As I said, relationships can have attributes.
>
> job(person_id, company_id, start_date, etc...) //job history of person
>
> What if I add a surrogate key?
I would say that you are doing relational modeling and not ER modeling.
>
> job(job_id, person_id, company_id, start_date, etc...) //job history of
> person
>
> Is this an entity or a relationship?
>
> Even if a distinction could be made between these cases, what purpose
> would it
> serve? What do we care if 'job' is called a relationship or an entity?
Troll.
>
> best regards,
> Lauri Pietarinen
>
>
>
Received on Thu Nov 20 2003 - 20:59:56 CET

Original text of this message