Re: Another view on analysis and ER
Date: Thu, 06 Dec 2007 19:13:58 +0100
David Cressey wrote:
>> Genuine question guys. [...]
>> How do I decide whether I am dealing with a marriage entity or a
>> marriage relationship?
>> The literature I'm reading here is telling me that the choice is based
>> on what 'things' are key to the business. If my business is concerned
>> with people (tax collection say), 'marriage' is best modelled as a
>> relationship, whereas if the marriages themselves are my focus
>> (perhaps I run a church) then its probably better as an entity.
That's a meta-answer: only model the information you're going to need and have. E.g. only put information about the marriage certificate into the model if you need it and have it.
But that doesn't really help you with the question whether to model a particular notion as a plain domain value, an entity, or a relationships. To answer that question, you have to determine the functional dependencies between them. (In E/R terms: the cardinalities of your relationships.)
Marriage is a relationship iff the only thing that identifies a marriage is the people involved. Is this the case in your situation? E.g. when you need to accomodate Elizabeth Taylor, who married the same person twice, will you need to distinguish between her individual marriages? If you do, you're going to need an additional attribute (e.g. date of marriage will do), turning the relationship into an entity (by definition).
>My answer is that it's subjective. If the subject matter experts all treat
>a marriage as a relationship, follow their lead. If the subject matter
>experts all treat it as an entity, follow their lead, but insist that
>there's a key attroubt that identifies it. (Do the SME's have any such
>thing as a "marriage ID" attribute?
The SME have a fairly unusual concept of marriage, as I just found out:
("Highlights of the tour include the body trim areas and the chassis/body marriage operations.")
-- ReinierReceived on Thu Dec 06 2007 - 19:13:58 CET