Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2012
    Posts
    11

    Weak entity types, multiple relationships

    Hi there,


    Can anyone tell me if it is possible to have 2 entities, one of which is a weak entity, with multiple relationships between the 2. Obvisouly one relationship is already an identifying relationship but what about the other relationship, how would that work?


    A second question.

    Can you have two relationships with the same name e.g. for my diagram I'm trying to show a user can create an event, a page, and a group. I cannot have them comimg of the same relationship because they dont all exist in the same relationship.. Is it legal to add 2 or 3 relationships called create?

    appreciate any help,
    Cheers,
    lavaski.
    Last edited by lavaski; 08-11-12 at 00:34. Reason: question 2.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    "Possible"? "Legal"? "Relationships with the same name"?
    ???
    This HAS to be a homework assignment...
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Aug 2012
    Posts
    11
    Far out, Its hard to get advice around here. Yea Its an assignment, so what ? its for my database class. Which means I'm still learning, anything I gain off any helpful person on this forum is going to give me a better understanding.

    Honestly dude if you have nothing helpful to offer, instead of replying some useless comment just open a new browser put in your favourite porn site and go get the only action you ever get.

    On a lighter note, if anyone has any insight into my original question it would be great to hear from you. I have found out all relationships should be unique so that means no 4*create.

    Sweet and cheers,

    Lavaski.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by lavaski View Post
    Honestly dude if you have nothing helpful to offer, instead of replying some useless comment just open a new browser put in your favourite porn site and go get the only action you ever get.
    you have no idea who you're messing with

    good luck with the rest of your pathetic little life
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Aug 2012
    Posts
    11
    Thats awesome dude Liam Nesson, the post to blindman applies to you as well. If your book is anything like how you choose to reply on this forum (and I don't just mean my thread ) then thats one shit book. You really dont do yourself any favours as an author.

    I don't care who you are mate.

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Yes, you can have multiple relationships between entities, although only one of the relationships between them can be identifying at any given time.

    You can have zero or more relationships between any two polygomous entities, and the names are irrelevant. The names can be the same or different, depending on your choices but it is safest to have unique names or aliases to prevent confusion.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  7. #7
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    Everyone makes the forum better . . .

    Some when they join and some when they leave . . .

    Usually (fortunately), the ill-tempered, foul-mouthed children don't last long - either in a forum or in the database business.

  8. #8
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Quote Originally Posted by lavaski View Post
    Thats awesome dude Liam Nesson,
    A fair analogy on this forum.
    Quote Originally Posted by lavaski View Post
    the post to blindman applies to you as well. If your book is anything like how you choose to reply on this forum (and I don't just mean my thread ) then thats one shit book. You really dont do yourself any favours as an author.

    I don't care who you are mate.
    But you do want assistance. And your snot-nosed delinquent attitude is quickly alienating the people who could give you the best advice advice, as well as all the people who are on a friendly basis with the people who could give you the best advice.
    Welcome to the real world, where you need to put forth some personal effort yourself, and where burning bridges and pissing off people you have asked assistance from doesn't generally pay off. You're not living with mommy and daddy any more.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Quote Originally Posted by blindman View Post
    You're not living with mommy and daddy any more.
    What makes you assume that?

    Nobody ran with my comments!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Sometimes you are far too subtle for all of us.
    Throw a little slapstick into your posts to broaden their appeal.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  11. #11
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    Nobody ran with my comments!
    Some ran away from . . .
    or
    Were saving reply space for TS . . .

  12. #12
    Join Date
    Aug 2012
    Posts
    11
    Quote Originally Posted by Pat Phelan View Post
    Yes, you can have multiple relationships between entities, although only one of the relationships between them can be identifying at any given time.

    You can have zero or more relationships between any two polygomous entities, and the names are irrelevant. The names can be the same or different, depending on your choices but it is safest to have unique names or aliases to prevent confusion.

    -PatP
    cheers for the info dude.

  13. #13
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    Quote Originally Posted by Pat Phelan View Post
    Yes, you can have multiple relationships between entities, although only one of the relationships between them can be identifying at any given time.
    Hi Pat. What makes you think that only one relationship can be identifying? I understand an identifying relationship to be one where there is "a reference from a foreign key in the child’s primary key to the parent’s primary key" [1]. If the child entity has a composite primary key then it could comprise multiple foreign keys referencing one parent entity. Those relationships would therefore all be identifying ones.

    It always seems to me that the distinction between identifying and non-identifying relationships is of very little importance. Presumably those concepts are useful to some people when attempting to understand and communicate a design but in practical and theoretical terms the distinction between identifying and non-identifying appears to be arbitrary and superfluous. Consider the example of a table with two candidate keys: A and B. A is also a foreign key. Now if I choose A as the primary key the relationship thus expressed is "identifying". If I change my mind and designate B as the primary key then the relationship becomes non-identifying. Yet the attributes, the business rules and presumably the business meaning being expressed are exactly the same in both cases! Why does it matter whether a relationship is "identifying" or not? Lavaski might like to ask his teacher that question.

    [1] Halpin. Information Modeling and Relational Databases, 2nd Edition, p. 326.

  14. #14
    Join Date
    Aug 2012
    Posts
    11
    Quote Originally Posted by dportas View Post
    Hi Pat. What makes you think that only one relationship can be identifying? I understand an identifying relationship to be one where there is "a reference from a foreign key in the child’s primary key to the parent’s primary key" [1]. If the child entity has a composite primary key then it could comprise multiple foreign keys referencing one parent entity. Those relationships would therefore all be identifying ones.

    It always seems to me that the distinction between identifying and non-identifying relationships is of very little importance. Presumably those concepts are useful to some people when attempting to understand and communicate a design but in practical and theoretical terms the distinction between identifying and non-identifying appears to be arbitrary and superfluous. Consider the example of a table with two candidate keys: A and B. A is also a foreign key. Now if I choose A as the primary key the relationship thus expressed is "identifying". If I change my mind and designate B as the primary key then the relationship becomes non-identifying. Yet the attributes, the business rules and presumably the business meaning being expressed are exactly the same in both cases! Why does it matter whether a relationship is "identifying" or not? Lavaski might like to ask his teacher that question.
    If I'm understanding you correctly then both A and B would be both uniquely identifying but A would be identifying as its also a foreign key. I think in your example there are already 2 candidate keys so it doesn't matter if it is identifying. In regards to a weak entity type where A is a regular entity type and B is the weak entity then it matters that the relationship is identifying so that every instance of that weak entity type can be uniquely identified.

Posting Permissions

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