Re: Relation or attribute and why
Date: 17 May 2006 05:00:05 -0700
Message-ID: <1147867205.156533.161630_at_i39g2000cwa.googlegroups.com>
Marshall wrote:
> dawn wrote:
> > Let's say that we have a noun present in a conceptual data model, but
> > not identified as a strong entitiy (recognizing not all conceptual
> > modeling techniques use such distinctions). What are the conditions
> > under which this noun will/should translate into an attribute in a
> > logical data model? What are the conditions under which this noun
> > will/should translate into a relation in the logical data model?
>
> I searched for a definition of "strong entity" and found this page:
>
> http://www.siue.edu/~dbock/cmis450/3-ermodel.htm
>
> which said:
>
> "A Strong Entity is one that exists on its own, independent of other
> entities.
> A Weak Entity is one whose existence depends on another entity. This
> means an occurrence of one entity cannot exist unless there is an
> occurrence
> of a related entity."
>
> If I read this correctly, it's saying that a strong entity is a
> conceptual
> entity that would be modelled with a table without a foreign key.
>
> Let's say I have a Customers table; an unremarkable example.
> Probably every Customer must have at least one Address.
> Likewise, every Address belongs to a specific Customer.
> Thus, the Customer cannot exist without the Address, and
> the Address cannot exist without the Customer. Thus, both
> are weak entities.
Defining a conceptual modeling term using a logical modeling concept (foreign key) seems confusing. An address is a strong entity as it can exist on its own. You don't need a person to live there. A person is a strong entity. If you remove an address, the person can remain. A person's address is a weak entity (if an entity at all). If you remove a person, you would want the person's address to be gone as well.
> At this point, I'm about ready to conclude
> that strong vs. weak is a term that is sufficiently fuzzy as
> to be at best evocative, and at worst simply distracting.
Yes, although if two people share a similar-enough definition, then it could be helpful in narrowing down the domain of this question. Strong entities would map to relations in a logical data model based on the RM. If that is not helpful, simply remove the offending phrase from the question.
> I never learned any formal modelling technique; I picked it up
> on the job. Sometimes this feels like an advantage.
Same here.
> Anyway, to take a stab at your actual question, I would
> say the thing to attend to, bearing in mind that I'm speaking
> quite informally, is the cardinality of the "noun."* If it's
> exactly-one
> with a "strong entity" then it's an attribute of that strong entity.
> Otherwise it's part of some other "sub" entity.
OK, so you would use that approach once known as normalization, then 1NF, and now having no widely-agreed-upon formal name for it at all, correct? Is it only cardinality or would arity also play a role?
Example, a Person modeled having a firstPetName and firstPetSpecies. These are both cardinality 1. If in the conceptual model decisions were made to limit the scope so as not to introduce an Animal or Pet thing, then in the logical data model, there would be no further partitioning to introduce a Pet and give it attributes of name and species, right? There would be no introduction of a new identity attribute for this pet. We would simply model firstPetName and firstPetSpecies as attributes of the Person relation. This is not intended to get at some fine line in the distinction between conceptual and logical model, but rather to think of the conceptual model as defining scope and vocabulary, with the logical model aligned with schema design.
Related question: There are times when nouns in the conceptual model end up being dropped from the logical model. If the conceptual model has nouns of name, lastName, firstName, middleName, title, and suffix, with name being a "group name" then name would be dropped, modeling only the components. Nouns are introduced in the case of developing a foreign key for your cardinality > 1 case above. They could also be added if a new identity is selected, such as a generated key. Are there other times when nouns are added or dropped?
<snip>
> * A noun is a kind of word, so I'm pretty sure you meant
> something else. </picky>
Any time terms like "thing" or "entity" are used, that becomes topic of discussion (even when used in a way intended only to help zero in on the issue at hand ;-). In contrast, "noun" is pretty clear and hopefully even useful given that the conceptual modeling has been done in this case. Replace it with the term "thing" if that helps.
Thanks --dawn Received on Wed May 17 2006 - 14:00:05 CEST
