Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    1

    Lightbulb ERD Diagram Design question

    I'm in the process of designing an ERD for small company. I need some help in explaining it in business terms to some executives... I need to convince them of the benefits of:

    1) For resolving a many-to-many entity relationships we can swap primary keys between the two entities. Another option would be to created a new entity in the middle and have the two outer entity's primary keys as foreign keys within the middle. Can someone describe the merits of using the first over the second?

    2) What's the difference of using weak versus strong entities in a database. Why does it make sense to use one instead of another? Are strong entities always preferable to weak entities?

    Hope someone can help me

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    if you could explain (maybe with data examples?) what you mean by "For resolving a many-to-many entity relationships we can swap primary keys between the two entities" then i would be happy to point out how it couldn't possibly work

    not sure what you mean by weak and strong entities, once you get to the point of declaring them in a database, the only things you can create are tables, views, and indexes... could you explain weak versus strong too please?

    rudy
    http://rudy.ca/

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: ERD Diagram Design question

    Originally posted by toidness
    I'm in the process of designing an ERD for small company. I need some help in explaining it in business terms to some executives... I need to convince them of the benefits of:

    1) For resolving a many-to-many entity relationships we can swap primary keys between the two entities. Another option would be to created a new entity in the middle and have the two outer entity's primary keys as foreign keys within the middle. Can someone describe the merits of using the first over the second?

    2) What's the difference of using weak versus strong entities in a database. Why does it make sense to use one instead of another? Are strong entities always preferable to weak entities?

    Hope someone can help me
    1) If by "swap primary keys" you mean:
    TABLE a( a_id PK, b_id FK REFERENCES b);
    TABLE b( b_id PK, a_id FK REFERENCES a);

    ... then what you have created is a one-to-one, not a many-to-many. The intersection entity ab is the only way to go.

    2) Weak and strong entities: a strong entity is one that can exist independently of other entities, e.g. ORDER, PERSON; a weak entity depends on another entity (or entities), e.g. ORDER LINE, PERSON JOB HISTORY.
    It is not that either is better or worse, they are just different.
    Of course, any weak entity can be made strong by giving it its own surrogate UID and making the relationship to the parent optional - but that would be a VERY BAD idea!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •