Re: Weak entity types
Date: Tue, 14 Aug 2007 23:12:59 -0000
Message-ID: <1187133179.545237.176000_at_o61g2000hsh.googlegroups.com>
On Aug 11, 11:55 pm, beginner16 <kaja_love..._at_yahoo.com> wrote:
> hello
>
> a)
> Weak entity type cannot be uniquely identified by its own attributes
> alone and thus needs another entity to be uniquely identified.
> So in relational model, every relation which has primary key made of
> foreign key and perhaps some other attribute, is weak entity type?
Continuing with what now seems to be a burgeoning obsession with identity, let me say....
Relations are not entities. Nor are rows. They are proposition's that discuss entities via their attributes. Entities are a consideration of the conceptual model. RM is a logical model. In the conceptual model a weak entity is an item that can only be identified due to a relationship with another entity in the schema. A strong entity is one that can be identified by its own attributes, independently of any other entities.
E.g. Employee 51, Frank has a child, John.
John's is a weak entity. His name would not be enough to distinguish him from all the other john's. He's only distinguishable from all the other Johns because we know he's employee 51's son. A consequence of this tends to be if we delete employee 51 from our system, we are going to want to delete Johnny too, but not necessarily vice versa.
If John had a unique attribute (SSN say), and we'd used that, he would be identifiable without his old man, and would hence then be a strong entity in his own right.
>
> Ok, but I could instead of creating a foreign key create another
> attribute which could uniquely identify rows in a table. By
> definition the relation would no longer be weak entity type --> there
> has to be more to this --> perhaps it’s more of a subjective thing?!
> Meaning two tables can both have compound primary key, but one table
> could be considered weak and other strong entity type, based on how
> the person creating the two tables would perceive the world?! Can you
> show me an example?
>
> If so, aren’t there some regulations that would in more objective way
> define when an entity is weak and when strong ( assuming entity has
> compound primary key in both cases )
>
> b)
> Looking at few E-R diagrams I noticed that attributes being drawn for
> particular entity type ( entity type is drawn as rectangle ) often
> don’t include an attribute acting as foreign key
> I’d understand if this entity type was weak entity type and thus would
> include foreign key attribute only when E-R model was converted into,
> say, relational model, but in the examples I saw the entity type
> wasn’t represented as a weak type. So when do we also draw foreign key
> attributes and when not?!
>
> thank you
Received on Wed Aug 15 2007 - 01:12:59 CEST