ERD: Associative Entities

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มี.ค. 2020

ความคิดเห็น • 7

  • @layanq9395
    @layanq9395 2 ปีที่แล้ว +1

    Thank you!!

  • @midnight-rain-13
    @midnight-rain-13 3 ปีที่แล้ว

    As for the last activity/example, can I write POSITION/ROLE as the associative entity? Its attributes would be, for instance, center, point guard, power forward, etc. Or does it only have to be STATISTIC which has to do with both the player and game? I'm having a hard time thinking the possible entities until I saw your answer. Thanks!

    • @DustinOrmond
      @DustinOrmond  3 ปีที่แล้ว

      You can name the associative entity whatever you want; however, the interaction means that this would only contain information that is related to a player in a game. So that is why STATISTIC makes sense here. When you can't come up with a good name for the associative entity, you can just use the two entities that are part of the relationship (i.e. PLAYER_GAME). Also, not all associative entities need to have attributes (other than an identifier), but they must always be created when there is a many-to-many relationship.
      Regarding POSITION/ROLE, this really depends on how you model your database; however, one idea is that it would be an attribute of STATISTIC/PLAYER_GAME to indicate the player's position or role during the game. The problem here is if a player plays different positions in a single game. Then you would need to model this differently and probably have POSITION be its own entity.

  • @sarmientojohncarlob.7087
    @sarmientojohncarlob.7087 3 ปีที่แล้ว +1

    Thanks for this

  • @massofyanhadi
    @massofyanhadi 3 ปีที่แล้ว +1

    Thanks you

  • @glendonchong3665
    @glendonchong3665 3 ปีที่แล้ว

    With regards to your first example of the EMPLOYEE and COURSE entity with the completes relationship having a date_completed relationship attribute, you created a new associative entity called CERTIFICATE with an attribute of date_completed. However, you did not include both the key identifiers of EMPLOYEE and COURSE into the CERTIFICATE associative entity and make them into a composite primary key. Can I check if this is violating your first slide in which you state that every associative entity has a unique identifier. (in this case a composite primary key of both employee_id and course_id) or it is ok to leave it as your example with just a attribute and no unique identifier.
    I understand that the creating of composite primary key is needed for coming up with relations (maybe further passed what you are teaching in this video) for the associative entity. However, if the questions ask for ER diagram solely, can i follow what you did in the video or do i have to do what i suggested and come up with an identifier?
    Thank you for clarifying my doubts!
    Best regards!

    • @DustinOrmond
      @DustinOrmond  3 ปีที่แล้ว

      I have updated this video with this instead: th-cam.com/video/C5rI47kWkUM/w-d-xo.html