Re: Another view on analysis and ER

From: rpost <>
Date: Wed, 12 Dec 2007 22:30:47 +0100
Message-ID: <3650f$47605307$839b4533$>

David BL wrote:

>On Dec 7, 5:36 am, JOG <> 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

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.)

Received on Wed Dec 12 2007 - 22:30:47 CET

Original text of this message