Skip to content

Tournament ~ Entity Relationship Diagram

MikeChen012345 edited this page Nov 5, 2023 · 12 revisions

An Entity-Relationship Diagram (ERD) based on user stories for a single-elimination style tournament:

Entities:

  1. User - Represents both the registered user and the player.

    • Attributes: Username, Participation (player/spectator), Email, Password, Status (active/suspended)
  2. Tournament - Represents the single-elimination tournament.

    • Attributes: TournamentID, Name, StartDate, EndDate, MaxPlayers, Description, Rules, DrawRule
  3. Match - Represents individual matches within a tournament.

    • Attributes: MatchID, MatchStatus (ongoing, completed, draw), MatchStartDate, MatchEndDate, MatchDuration, Score
  4. Game - Represents the games that can be played in the tournaments.

    • Attributes: GameID, GameName
  5. Notification - Represents the notifications sent to users about their matches.

    • Attributes: NotificationID, Content, Timestamp, Visibility
  6. Chat - Represents the live chat feature for both players and spectators.

    • Attributes: ChatID
  7. Message - Represents the individual message which populates the Chat entity.

    • Attributes: MessageID, Content, Timestamp

Relationships:

  1. A User can create multiple Tournaments. (Many-to-Many)
  2. A Tournament consists of multiple Matches. (One-to-Many)
  3. A Match involves multiple Users. (Many-to-Many)
  4. A Tournament is associated with one Game. (Many-to-One)
  5. A User can join many Tournaments (Many-to-Many)
  6. A User receives multiple Notifications. (Many-to-Many)
  7. A Match has only one Chat. (One-to-One)
  8. A Chat has many Message. (One-to-Many)
  9. A Match has a winner User. (Many-to-One)
  10. A Tournament has multiple winner User. (Many-to-Many)
  11. A User can send multiple Messages. (One-to-Many)
Clone this wiki locally