Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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:
- 1. **tbl_user**:
- - **Attributes**:
- - `user_id`: Primary key, uniquely identifies a user.
- - `username`: The username of the user.
- - `password`: The password for the user's account.
- 2. **tbl_organizer**:
- - **Attributes**:
- - `organizer_id`: Primary key, uniquely identifies an organizer.
- - `organizer_name`: The name of the organizer.
- - `email`: The email address of the organizer.
- - `user_id`: Foreign key, references `user_id` in `tbl_user`.
- - **Relationships**:
- - Each organizer is associated with one user (`user_id`).
- 3. **tbl_event**:
- - **Attributes**:
- - `event_id`: Primary key, uniquely identifies an event.
- - `event_name`: The name of the event.
- - `event_status`: The status of the event (e.g., upcoming, completed).
- - `organizer_id`: Foreign key, references `organizer_id` in `tbl_organizer`.
- - **Relationships**:
- - Each event is organized by one organizer (`organizer_id`).
- 4. **tbl_eventCategory**:
- - **Attributes**:
- - `eventCategory_id`: Primary key, uniquely identifies an event category.
- - `eventCategory_name`: The name of the event category.
- - `dateTimeStart`: The start date and time of the event category.
- - `dateTimeEnd`: The end date and time of the event category.
- - `event_id`: Foreign key, references `event_id` in `tbl_event`.
- - **Relationships**:
- - Each event category belongs to one event (`event_id`).
- 5. **tbl_judge**:
- - **Attributes**:
- - `judge_id`: Primary key, uniquely identifies a judge.
- - `Fname`: First name of the judge.
- - `Mname`: Middle name of the judge.
- - `Lname`: Last name of the judge.
- - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
- - **Relationships**:
- - Each judge is associated with one event category (`eventCategory_id`).
- 6. **tbl_contestant**:
- - **Attributes**:
- - `contestant_id`: Primary key, uniquely identifies a contestant.
- - `fname`: First name of the contestant.
- - `mname`: Middle name of the contestant.
- - `lname`: Last name of the contestant.
- - `gender`: Gender of the contestant.
- - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
- - **Relationships**:
- - Each contestant is associated with one event category (`eventCategory_id`).
- 7. **tbl_score**:
- - **Attributes**:
- - `score_id`: Primary key, uniquely identifies a score record.
- - `score`: The score given by the judge.
- - `event_id`: Foreign key, references `event_id` in `tbl_event`.
- - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
- - `contestant_id`: Foreign key, references `contestant_id` in `tbl_contestant`.
- - `judge_id`: Foreign key, references `judge_id` in `tbl_judge`.
- - **Relationships**:
- - Each score is associated with one event (`event_id`), one event category (`eventCategory_id`), one contestant (`contestant_id`), and one judge (`judge_id`).
- 8. **tbl_criteria**:
- - **Attributes**:
- - `criteria_id`: Primary key, uniquely identifies a criteria record.
- - `criteria_for_judging`: The criteria used for judging.
- - `score_id`: Foreign key, references `score_id` in `tbl_score`.
- - `eventCategory_id`: Foreign key, references `eventCategory_id` in `tbl_eventCategory`.
- - **Relationships**:
- - Each criteria is associated with one score (`score_id`) and one event category (`eventCategory_id`).
- ### Summary of Relationships:
- - `tbl_user` to `tbl_organizer`: One-to-Many (one user can be associated with multiple organizers).
- - `tbl_organizer` to `tbl_event`: One-to-Many (one organizer can organize multiple events).
- - `tbl_event` to `tbl_eventCategory`: One-to-Many (one event can have multiple event categories).
- - `tbl_eventCategory` to `tbl_judge`: One-to-Many (one event category can have multiple judges).
- - `tbl_eventCategory` to `tbl_contestant`: One-to-Many (one event category can have multiple contestants).
- - `tbl_eventCategory` to `tbl_score`: One-to-Many (one event category can have multiple scores).
- - `tbl_event` to `tbl_score`: One-to-Many (one event can have multiple scores).
- - `tbl_contestant` to `tbl_score`: One-to-Many (one contestant can have multiple scores).
- - `tbl_judge` to `tbl_score`: One-to-Many (one judge can give multiple scores).
- - `tbl_score` to `tbl_criteria`: One-to-Many (one score can have multiple criteria).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement