Advertisement
SenpaiZero

Untitled

May 24th, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.66 KB | None | 0 0
  1. This Entity-Relationship Diagram (ERD) depicts a system that manages events, organizers, users, judges, contestants, and scoring for different event categories. Here's a detailed explanation of each entity and their relationships:
  2.  
  3. 1. **tbl_user**:
  4. - **Attributes**:
  5. - `user_id`: Primary key, uniquely identifies a user.
  6. - `username`: The username of the user.
  7. - `password`: The password for the user's account.
  8.  
  9. 2. **tbl_organizer**:
  10. - **Attributes**:
  11. - `organizer_id`: Primary key, uniquely identifies an organizer.
  12. - `organizer_name`: The name of the organizer.
  13. - `email`: The email address of the organizer.
  14. - `user_id`: Foreign key, references `user_id` in `tbl_user`.
  15. - **Relationships**:
  16. - Each organizer is associated with one user (`user_id`).
  17.  
  18. 3. **tbl_event**:
  19. - **Attributes**:
  20. - `event_id`: Primary key, uniquely identifies an event.
  21. - `event_name`: The name of the event.
  22. - `event_status`: The status of the event (e.g., upcoming, completed).
  23. - `organizer_id`: Foreign key, references `organizer_id` in `tbl_organizer`.
  24. - **Relationships**:
  25. - Each event is organized by one organizer (`organizer_id`).
  26.  
  27. 4. **tbl_eventCategory**:
  28. - **Attributes**:
  29. - `eventCategory_id`: Primary key, uniquely identifies an event category.
  30. - `eventCategory_name`: The name of the event category.
  31. - `dateTimeStart`: The start date and time of the event category.
  32. - `dateTimeEnd`: The end date and time of the event category.
  33. - `event_id`: Foreign key, references `event_id` in `tbl_event`.
  34. - **Relationships**:
  35. - Each event category belongs to one event (`event_id`).
  36.  
  37. 5. **tbl_judge**:
  38. - **Attributes**:
  39. - `judge_id`: Primary key, uniquely identifies a judge.
  40. - `Fname`: First name of the judge.
  41. - `Mname`: Middle name of the judge.
  42. - `Lname`: Last name of the judge.
  43. - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
  44. - **Relationships**:
  45. - Each judge is associated with one event category (`eventCategory_id`).
  46.  
  47. 6. **tbl_contestant**:
  48. - **Attributes**:
  49. - `contestant_id`: Primary key, uniquely identifies a contestant.
  50. - `fname`: First name of the contestant.
  51. - `mname`: Middle name of the contestant.
  52. - `lname`: Last name of the contestant.
  53. - `gender`: Gender of the contestant.
  54. - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
  55. - **Relationships**:
  56. - Each contestant is associated with one event category (`eventCategory_id`).
  57.  
  58. 7. **tbl_score**:
  59. - **Attributes**:
  60. - `score_id`: Primary key, uniquely identifies a score record.
  61. - `score`: The score given by the judge.
  62. - `event_id`: Foreign key, references `event_id` in `tbl_event`.
  63. - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
  64. - `contestant_id`: Foreign key, references `contestant_id` in `tbl_contestant`.
  65. - `judge_id`: Foreign key, references `judge_id` in `tbl_judge`.
  66. - **Relationships**:
  67. - Each score is associated with one event (`event_id`), one event category (`eventCategory_id`), one contestant (`contestant_id`), and one judge (`judge_id`).
  68.  
  69. 8. **tbl_criteria**:
  70. - **Attributes**:
  71. - `criteria_id`: Primary key, uniquely identifies a criteria record.
  72. - `criteria_for_judging`: The criteria used for judging.
  73. - `score_id`: Foreign key, references `score_id` in `tbl_score`.
  74. - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
  75. - **Relationships**:
  76. - Each criteria is associated with one score (`score_id`) and one event category (`eventCategory_id`).
  77.  
  78. ### Summary of Relationships:
  79. - `tbl_user` to `tbl_organizer`: One-to-Many (one user can be associated with multiple organizers).
  80. - `tbl_organizer` to `tbl_event`: One-to-Many (one organizer can organize multiple events).
  81. - `tbl_event` to `tbl_eventCategory`: One-to-Many (one event can have multiple event categories).
  82. - `tbl_eventCategory` to `tbl_judge`: One-to-Many (one event category can have multiple judges).
  83. - `tbl_eventCategory` to `tbl_contestant`: One-to-Many (one event category can have multiple contestants).
  84. - `tbl_eventCategory` to `tbl_score`: One-to-Many (one event category can have multiple scores).
  85. - `tbl_event` to `tbl_score`: One-to-Many (one event can have multiple scores).
  86. - `tbl_contestant` to `tbl_score`: One-to-Many (one contestant can have multiple scores).
  87. - `tbl_judge` to `tbl_score`: One-to-Many (one judge can give multiple scores).
  88. - `tbl_score` to `tbl_criteria`: One-to-Many (one score can have multiple criteria).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement