Path: text.usenetserver.com!out02a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!feeder.news-service.com!feed.xsnews.nl!border-1.ams.xsnews.nl!tudelft.nl!binfeed2.tudelft.nl!news1.tudelft.nl!not-for-mail
Newsgroups: comp.databases.theory
Subject: Re: Another view on analysis and ER
References: <mkf5j.3247$QS.1019@trndny03> <0b089c8d-2ed7-4d9d-a35a-e0adc54ee4b3@a39g2000pre.googlegroups.com> <defa7667-bec9-4cda-937c-66fae96833d4@e25g2000prg.googlegroups.com> <82454ebf-f6df-437b-a937-fba746d170e6@i29g2000prf.googlegroups.com>
Organization: TU/e
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
From: rpost@pcwin518.campus.tue.nl (rpost)
Originator: rpost@pcwin518.campus.tue.nl (rpost)
Message-ID: <3650f$47605307$839b4533$8955@news1.tudelft.nl>
X-Complaints-To: sysadmin@tudelft.nl
Date: Wed, 12 Dec 2007 22:30:47 +0100
Lines: 84
NNTP-Posting-Host: dyn424.win.tue.nl (131.155.69.51)
NNTP-Posting-Date: Wed, 12 Dec 2007 22:30:47 +0100
X-Trace: 3650f47605307263ee09608955
Xref: usenetserver.com comp.databases.theory:168073
X-Received-Date: Wed, 12 Dec 2007 16:30:47 EST (text.usenetserver.com)

David BL  wrote:

>On Dec 7, 5:36 am, JOG <j...@cs.nott.ac.uk> wrote:

[...]

>X is an entity in the context of the model if there exists set A of
>attributes + values that identify X and there doesn't exist a subset
>of A that identifies a different entity Y.
>
>Actually this attempted definition isn't quite right.  For example you
>could determine that a team is an entity except for the fact that you
>end up identifying the team captain as well.   Perhaps that problem
>can be fixed by talking about maximal entity types corresponding to
>cartesian products of domains and noting that team identifiers aren't
>suitable for identifying players more generally.  Maybe Reinier can
>help.

My knowledge of E/R modelling according to Silberschatz et al.
can be summarized as follows:

+ an E/R model is a relational model except that relations
  are used as attribute domains
  (except that I'm ignoring composition and multivalued attributes);
  to be more exact, not the tuples of a relation are the domain values,
  but *references* to those tuples

+ one way to formalize E/R models is by expressing such references
  as surrogate keys; this technically makes E/R models a subclass
  of the relational models (and incidentally, composition can be
  dealt with in a similar way)

+ a particular phase in E/R modelling is identification, in which
  the keys for all relations are indicated, and additionally,
  for every relation one key is picked to be the primary key
  (and no key consists of a relation's own surrogate)

+ another step is to indicate for each attribute whether it is optional
  or required; clearly keys must consist of required attributes

+ definition 1: a relation in a (fully identified) E/R model is called
  - a (strong) *entity set*, if its primary key consists of non-surrogates
  - an *weak entity set*, if its primary key contains surrogates and
    non-surrogates
  - a *relationship set*, if its primary key contains only surrogates

+ definition 2 (not from Silberschatz, but I need it):
  a relation in a (fully identified) E/R model is called
  - objectified, if some relation uses it as an attribute domain
    (in the sense above)

+ observation 1: in most E/R models, all objectified relations are
  entity sets, and nearly all entity sets are objectified relations;
  many E/R modelling courses actually impose this as a modelling
  requirement (in other words: the attributes form a two-level
  acyclic graph)

+ a proper *logical* model is a relational model without surrogates

+ a standard procedure for deriving a logical model from an E/R model
  is to recursively substitute all relation references with the relation's
  primary keys, but this requires the absence of recursion in key
  dependencies (another common modelling requirement);
  e.g. we can't make a Person's parent (a Person) part of
  the primary key of Person

+ observation 3: according to definition 1, all relations in
  a logical model are entity sets; according to definition 2,
  none of them are objectified

+ observation 4: it "feels wrong" to call the relations in a
  logical model entity sets

+ observation 5: when we informally speak of an "entity",
  we actually mean an objectified relation
  (or more generally, something referred to by an attribute);
  observation 4 is strong evidence for this, while observation 1
  explains why this rarely leads to confusion during conceptual modelling

Defined in this way, E/R models are effectively a subset of ORM models.
(ORM models support objectified relationships and a few other constructs.)

-- 
Reinier
