Re: What is a Relationship !?

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Thu, 20 Nov 2003 21:14:42 +0200
Message-ID: <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...
And, further, a relationship could become an entity just by giving it a unique identifier.

Take for example

person(person_id, person_name, etc...)
company(company_id, company_name, etc...) job(person_id, company_id, etc...) //current job(s) of person

Now would 'job' be an entity or a relationship?

What if I add start_date?

job(person_id, company_id, start_date, etc...) //job history of person

What if I add a surrogate key?

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?

best regards,
Lauri Pietarinen Received on Thu Nov 20 2003 - 20:14:42 CET

Original text of this message