Naypyitaw State Polytechnic University
Faculty of Computing
Department of Information Science
2025-2026 Academic Year, Semester I
Mentorship Hub for Polytechnic Students
for
IS-201 Fundamental Database Management System
March, 2026
Project Members
No. Student ID RollNumber Student Name
1 NSPU-2024-CST-181 II CST-4 Ei Thu Thu Han
2 NSPU-2024-CST-002 II CST-12 Mi Aye Cham Mon
3 NSPU-2024-CST-003 II CST-57 Kaung Htet Ko Ko
4 NSPU-2024-CST-003 II CST-64 Kaung Myat Zaw
i
Acknowledgements
We would like to express our sincere gratitude to the Rector and Pro-Rector of
Naypyitaw State Polytechnic University for their leadership and support in providing a
conducive academic environment for this project.
We would also like to extend our heartfelt thanks to our lecturer for the guidance
and support provided throughout this project. Their valuable advice and clear
explanations helped us to understand the fundamental concepts of Database
Management Systems, including requirement analysis, ER diagram design, and SQL
implementation.
Furthermore, we would like to thank the Faculty of Computing, Naypyitaw State
Polytechnic University, for providing the opportunity and necessary resources to
complete this project. Finally, we are grateful to our classmates and friends for their
support and encouragement during the completion of this work.
ii
Abstract
This project focuses on the design and implementation of a database system for
Mentorship Hub for Polytechnic Students, an academic support platform developed
using Python programming language with CustomTkinter for the graphical user
interface and MySQL for database management. The system is designed to connect
three main user roles—Teachers, Senior Students, and Junior Students—within a
polytechnic institution to facilitate structured peer-to-peer mentorship and academic
guidance. The project begins with requirement analysis, where the system overview,
user processes, entities, attributes, and relationships are identified. Based on this
analysis, an Entity-Relationship (ER) diagram is constructed to visually represent the
structure of the system, followed by the conversion into relational tables with proper
normalization to ensure data consistency and reduce redundancy. SQL statements are
developed to create the database, manipulate data, and retrieve meaningful information
using queries such as mentor search, pending requests, and message retrieval. The
graphical user interface is implemented using CustomTkinter, providing role-based
dashboards that display relevant information and functions for each user type. Sample
data is included to demonstrate the functionality of the system. Through this project, a
comprehensive understanding of database design, data modeling, SQL operations, and
Python GUI application development is achieved, which are essential skills for
developing efficient database-driven software systems.
Keywords: Database Management System; ER Diagram; Relational Schema;
SQL; Python; CustomTkinter; Mentorship System; Peer-to-Peer Learning
iii
Table of Contents
Project Members...................................................................................................................i
Acknowledgements.............................................................................................................ii
Abstract..............................................................................................................................iii
Table of Contents................................................................................................................iv
List of Tables......................................................................................................................vi
List of Figures....................................................................................................................vii
Chapter 1 Introduction 1
1.1. Database Management System (DBMS)...................................................................1
1.2. Advantages of DBMS................................................................................................2
1.3. Disadvantages of DBMS...........................................................................................2
1.4. Background of the System.........................................................................................3
1.5. Problem Statement.....................................................................................................3
1.6. Objectives of the Project............................................................................................4
1.7. Scope of the Project...................................................................................................5
1.8. Organization of the Report........................................................................................5
Chapter 2 Requirement Analysis and ER Diagram 7
2.1. System Overview.......................................................................................................7
2.2. Process of the System................................................................................................7
2.3. Identification of Entities............................................................................................8
2.4. Attributes of Entities..................................................................................................9
2.5. Relationships Between Entities...............................................................................11
2.6. Cardinality and Participation...................................................................................11
2.7. ER Diagram.............................................................................................................12
2.8. Explanation of ER Diagram....................................................................................13
Chapter 3 Relational Schema and SQL Implementation 15
3.1. Mapping ER Diagram to Relational Schema...........................................................15
3.2. Table Structure (Schema Design)............................................................................15
3.3. SQL DDL Statements (Table Creation)..................................................................18
iv
3.4. SQL DML Statements (Data Manipulation)...........................................................21
3.5. SQL Queries (Data Retrieval).................................................................................27
3.6. Sample Data.............................................................................................................29
Chapter 4 Conclusion 32
v
List of Tables
Table 3.2.1: skill Table Structure....................................................................................15
Table 3.2.2: user Table Structure....................................................................................16
Table 3.2.3: mentorship_request Table Structure............................................................16
Table 3.2.4: event Table Structure..................................................................................17
Table 3.2.5: event_participation Table Structure............................................................17
Table 3.2.6: announcement Table Structure....................................................................18
Table 3.6.1 User Table....................................................................................................29
Table 3.6.2 Skill Table....................................................................................................29
Table 3.6.3 Mentorship_request Table............................................................................30
Table 3.6.4 Event Table...................................................................................................30
Table 3.6.5 Event_Participation Table............................................................................30
Table 3.6.7 Announcement Table...................................................................................31
vi
List of Figures
Figure 2.1. ER Diagram for Mentorship Hub for Polytechnic Student...........................12
vii
Chapter 1
Introduction
The rapid development of technology has significantly improved the way data is
stored, managed, and accessed in modern systems. Database Management Systems
(DBMS) play a vital role in organizing large amounts of data efficiently and ensuring
data consistency, security, and reliability.
This project, titled “Mentorship Hub for Polytechnic Students”, focuses on the
design and development of a database system that supports mentorship activities within a
polytechnic environment. The system aims to create a structured platform where students
can connect with mentors, send mentorship requests, and participate in academic events.
In traditional systems, mentorship activities are often handled manually, which
leads to inefficiencies such as data redundancy, difficulty in tracking requests, and lack
of proper communication. To overcome these challenges, this project introduces a
centralized database system that improves data management and enhances user
interaction.
The system is designed using fundamental concepts of DBMS, including
requirement analysis, Entity-Relationship (ER) modeling, relational schema design, and
SQL implementation. Through this project, students can gain practical knowledge of
database design and understand how real-world systems are developed and managed.
1.1. Database Management System (DBMS)
A Database Management System (DBMS) is a software system used to
store,manage, and retrieve data efficiently. It allows users to organize data in a structured
way using tables, relationships, and constraints. DBMS helps to reduce data redundancy,
improve data consistency, and ensure data security. Common examples of DBMS
include MySQL, Oracle, and Microsoft SQL Server.
1
In this project, MySQL is used as the DBMS to implement the database for the
Mentorship Hub system. MySQL is an open-source relational database management
system that is widely used for web and desktop applications due to its reliability,
performance, and ease of use.
1.2. Advantages of DBMS
The following are the key advantages of using a Database Management System:
Reduced Data Redundancy: DBMS eliminates duplicate data by storing
information in a centralized location with proper normalization.
Data Consistency: By reducing redundancy, DBMS ensures that data remains
consistent across the entire system.
Data Security: DBMS provides security features such as user authentication and
access control to protect sensitive information.
Data Integrity: DBMS enforces integrity constraints to ensure the accuracy and
validity of data.
Concurrent Access: Multiple users can access the database simultaneously
without data corruption.
Backup and Recovery: DBMS provides mechanisms for data backup and
recovery in case of system failure.
1.3. Disadvantages of DBMS
Despite its many advantages, DBMS also has some limitations:
Cost: Commercial DBMS software can be expensive, though open-source options
like MySQL are free.
Complexity: Designing and managing a database requires specialized knowledge
and skills.
2
Performance Overhead: DBMS may introduce additional processing overhead
compared to simple file systems.
Hardware Requirements: DBMS typically requires more powerful hardware
resources.
1.4. Background of the System
Mentorship Hub for Polytechnic Students is an academic support platform
designed to connect teachers, senior students, and junior students within a polytechnic
institution. The system aims to facilitate peer-to-peer learning, knowledge sharing, and
academic guidance.
In many educational institutions, students often struggle to find appropriate
mentors for their academic needs. Teachers are busy with administrative duties, and
senior students who could provide valuable guidance are not easily accessible.
Additionally, there is no centralized system to track mentorship requests, sessions, and
feedback.
The Mentorship Hub system addresses these challenges by providing a structured
platform where:
Junior students can search for and request mentorship from teachers or senior
students
Mentors can manage their availability and respond to requests
Users can communicate through built-in messaging
Events and announcements can be shared with the community
1.5. Problem Statement
The current system for academic mentorship at the institution has several
limitations:
No Centralized Platform: There is no dedicated system for connecting students
with mentors.
3
Manual Coordination: Mentorship arrangements are made through informal
communication, leading to confusion and missed opportunities.
Lack of Tracking: There is no way to track mentorship requests, session history,
or feedback.
Data Redundancy: Student and mentor information is stored in multiple places,
leading to inconsistency.
Inefficient Communication: No built-in messaging system for mentors and
mentees to communicate.
No Event Management: Workshops, seminars, and other events are not
systematically managed.
Limited Visibility: Students have no way to know which mentors are available or
what skills they possess.
1.6. Objectives of the Project
The main objectives of this project are:
To design a database for the Mentorship Hub system using ER diagram and
relational schema.
To identify entities, attributes, and relationships that accurately represent the
mentorship process.
To create a well-structured database with proper normalization to eliminate
redundancy.
To implement SQL statements for creating tables, manipulating data, and
retrieving meaningful information.
To provide sample data that demonstrates the functionality of the system.
To document the entire database design process following the standard format of
Naypyitaw State Polytechnic University.
4
1.7. Scope of the Project
The Mentorship Hub system includes the following features:
Included in the System:
User registration and login (Teachers, Senior Students, Junior Students)
User profiles with personal information, skills, and interests
Mentor search functionality
Mentorship request and response system
Private messaging between mentors and mentees
Event creation and registration
Announcement posting and viewing
Not Included in the System:
Payment processing
Video conferencing integration
Mobile application (desktop-only)
Third-party API integrations
1.8. Organization of the Report
This report is organized into four chapters:
Chapter 1: Introduction – Provides background information, problem statement,
objectives, and scope of the project.
Chapter 2: Requirement Analysis and ER Diagram – Describes the system overview,
identifies entities and attributes, defines relationships, and presents the ER diagram.
5
Chapter 3: Relational Schema and SQL Implementation – Converts the ER diagram
into relational tables, presents table structures, and includes SQL statements for
database creation, data manipulation, and queries.
Chapter 4: Conclusion – Summarizes the project findings, discusses what was
learned, and suggests future improvements.
6
Chapter 2
Requirement Analysis and ER Diagram
2.1. System Overview
The Mentorship Hub system is designed to facilitate academic mentorship within
a polytechnic institution. The system serves three main user roles:
Teacher: Can act as a mentor, accept or reject mentorship requests, create events,
and post announcements.
Senior Student: Can act as both a mentor (for junior students) and a mentee (for
teachers). Can also create events and announcements.
Junior Student: Can act only as a mentee. Can search for mentors, send requests,
and join events.
The system allows users to:
Register and maintain their profiles
Search for mentors based on skills, department, or name
Send and respond to mentorship requests
Communicate through private messages
Create and join events such as workshops and seminars
View and post announcements
2.2. Process of the System
The typical workflow of the Mentorship Hub system is as follows:
7
User Registration: A new user registers with their personal details, role
(teacher, senior student, or junior student), department, and skills.
Login: Registered users log in to the system using their username and
password.
Profile Management: Users can view and update their profiles, including
personal information, skills, projects, and certificates.
Mentor Search: Junior students and senior students (as mentees) can
search for mentors by name, skill, or department.
Send Request: The mentee sends a mentorship request to a selected
mentor with a subject and message.
Request Response: The mentor receives the request and can accept or
reject it.
Messaging: Once accepted, the mentor and mentee can communicate
through private messages.
Event Management: Teachers and senior students can create events; all
users can join events.
Announcements: Teachers and senior students can post announcements;
all users can view them.
2.3. Identification of Entities
The main entities in the system are:
User
Skill
Mentorship_request
Event
8
Event_Participation
Announcement
2.4. Attributes of Entities
User
User_Id (Primary Key)
User_name
Email
Password
Email
Department
Role
Major
Bio
Created_at
Skill
Skill_id (Primary Key)
Skill_name
Category
Mentorship_request
Request_id (Primary Key)
Mentor_id (Foreign Key)
9
Mentee_id (Foreign Key)
Status
Subject
Message
Event
Event_id (Primary Key)
User_id (Foreign Key)
Start_date
Title
Status
Description
Event_type
Platform
Max_participant
Event_Participation
Participant_id (Primary Key)
User_id (Foreign Key)
Event_id (Foreign Key)
Register_at
Attendance_status
10
Announcement
Announcement_id (Primary Key)
User_id (Foreign Key)
Title
Content
Priority
2.5. Relationships Between Entities
User Possesses Skills
User Assigned/Receive Mentorship_request (as Mentor or Mentee)
User Creates Event
User Participates in Event_Participation
Event has Event_Participation
User Posts Announcement
2.6. Cardinality and Participation
User to Skill: One-to-Many (1:N)
User to Mentorship_request: One-to-Many (1:N)
User to Event: One-to-Many (1:N)
User to Event_Participation: One-to-Many (1:N)
Event to Event_Participation: One-to-Many (1:N)
User to Announcement: One-to-Many (1:N)
11
2.7. ER Diagram
Figure 2.1. ER Diagram for Mentorship Hub for Polytechnic Students
12
2.8. Explanation of ER Diagram
The ER diagram above represents the database structure for the Mentorship Hub
system with six core entities:
2.8.1 User Entity
The User entity is the central entity that stores all user information. It includes
attributes: user_id (primary key), user_name, password, email, role, major, and bio. The
role attribute determines the user's access level (teacher, senior_student, junior_student).
2.8.2 Skill Entity
The Skill entity stores available skills that users can possess. It includes skill_id
(primary key), skill_name, and category. The relationship between User and Skill is
many-to-many (M:N), implemented through a junction table called "possesses".
2.8.3 Mentorship_Request Entity
The Mentorship_Request entity represents mentorship requests between users. It
has two foreign keys:
· mentor_id (assigned role) - references the user acting as mentor
· mentee_id (receive role) - references the user acting as mentee
This creates two separate 1:M relationships where one user can have many
requests as mentor, and one user can have many requests as mentee.
2.8.4 Event Entity
The Event entity stores information about workshops, seminars, and other events.
It includes event_id (primary key), organizer_id (foreign key to User), title, description,
event_type, platform, start_date, and max_participant. The relationship between User
and Event is 1:M (one organizer can create many events).
13
2.8.5 Event_Participation Entity
The Event_Participation entity links users to events they attend. It includes
participation_id (primary key), event_id (foreign key), user_id (foreign key),
registration_at, and attendance_status. This creates two 1:M relationships: one event can
have many participants, and one user can join many events.
2.8.6 Announcement Entity
The Announcement entity stores system announcements. It includes
announcement_id (primary key), announcer_id (foreign key to User), title, and content.
The relationship between User and Announcement is 1:M (one user can post many
announcements).
14
Chapter 3
Relational Schema and SQL Implementation
3.1. Mapping ER Diagram to Relational Schema
The ER diagram is converted into the following relational tables. Primary Keys (PK)
are underlined, and Foreign Keys (FK) are noted to show relationships.
User (User_id PK, User_name, Email, Password, Role, Major, Bio,Department,
Created_at)
Skill (Skill_id PK, Skill_name, Category)
Mentorship_request (Request_id PK, Mentor_id FK, Mentee_id FK, Subject,
Status, Message)
Event (Event_id PK, User_id FK, Title, Description, Event_type, Start_date,
Max_participant, Platform)
Event_Participation (Participant_id PK, User_Id FK, Event_id FK,
Registration_at, Attendance_status)
Announcement (Announcement_id PK, User_Id FK Title, Content)
3.2. Table Structure (Schema Design)
Table 3.2.1: skill Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
skill_id INT
AUTO_INCREMENT
skill_name VARCHAR(100) NOT NULL
category VARCHAR(50) -
15
Table 3.2.2: user Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
user_id INT
AUTO_INCREMENT
user_name VARCHAR(50) NOT NULL
password VARCHAR(255) NOT NULL
email VARCHAR(100) NOT NULL
role VARCHAR(20) NOT NULL
major VARCHAR(100) -
bio TEXT -
Table 3.2.3: mentorship_request Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
request_id INT
AUTO_INCREMENT
FOREIGN KEY ,
mentor_id INT
NOT NULL
FOREIGN KEY ,
mentee_id INT
NOT NULL
subject VARCHAR(200) NOT NULL
message TEXT NOT NULL
16
Table 3.2.4: event Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
event_id INT
AUTO_INCREMENT
FOREIGN KEY ,
user_id INT
NOT NULL
title VARCHAR(200) NOT NULL
description TEXT NOT NULL
event_type VARCHAR(50) NOT NULL
platform VARCHAR(100) -
start_date DATE NOT NULL
max_participant INT DEFAULT 0
Table 3.2.5: event_participation Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
participation_id INT
AUTO_INCREMENT
FOREIGN KEY , NOT
event_id INT
NULL
FOREIGN KEY , NOT
user_id INT
NULL
DEFAULT
registration_at TIMESTAMP
CURRENT_TIMESTAMP
attendance_status VARCHAR(20) DEFAULT 'registered'
17
Table 3.2.6: announcement Table Structure
Column Name Data Type Constraints
PRIMARY KEY ,
announcement_id INT
AUTO_INCREMENT
FOREIGN KEY ,
user_id INT
NOT NULL
title VARCHAR(200) NOT NULL
content TEXT NOT NULL
3.3. SQL DDL Statements (Table Creation)
The following SQL code creates the database structure with all necessary
relationships and constraints.
3.3.1. User Table
CREATE TABLE user (
user_id INT PRIMARY KEY AUTO_INCREMENT,
user_name VARCHAR(50) NOT NULL,
password VARCHAR(255) NOT NULL,
email VARCHAR(100) NOT NULL,
role VARCHAR(20) NOT NULL,
major VARCHAR(100),
bio TEXT
);
18
3.3.2. Skill Table
CREATE TABLE skill (
skill_id INT PRIMARY KEY AUTO_INCREMENT,
skill_name VARCHAR(100) NOT NULL,
category VARCHAR(50)
);
3.3.3. Mentorship Request Table
CREATE TABLE mentorship_request (
request_id INT PRIMARY KEY AUTO_INCREMENT,
mentor_id INT NOT NULL,
mentee_id INT NOT NULL,
subject VARCHAR(200) NOT NULL,
message TEXT NOT NULL,
status VARCHAR(20) DEFAULT 'pending',
FOREIGN KEY (mentor_id) REFERENCES user(user_id) ON DELETE
CASCADE,
FOREIGN KEY (mentee_id) REFERENCES user(user_id) ON DELETE
CASCADE
);
3.3.4. Event Table
CREATE TABLE event (
event_id INT PRIMARY KEY AUTO_INCREMENT,
19
organizer_id INT NOT NULL,
title VARCHAR(200) NOT NULL,
description TEXT NOT NULL,
event_type VARCHAR(50) NOT NULL,
platform VARCHAR(100),
start_date DATE NOT NULL,
max_participant INT DEFAULT 0,
FOREIGN KEY (organizer_id) REFERENCES user(user_id) ON DELETE
CASCADE
);
3.3.5. Event Participation Table
CREATE TABLE event_participation (
participation_id INT PRIMARY KEY AUTO_INCREMENT,
event_id INT NOT NULL,
user_id INT NOT NULL,
registration_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
attendance_status VARCHAR(20) DEFAULT 'registered',
FOREIGN KEY (event_id) REFERENCES event(event_id) ON DELETE
CASCADE,
FOREIGN KEY (user_id) REFERENCES user(user_id) ON DELETE
CASCADE
);
20
3.3.6. Announcement Table
CREATE TABLE announcement (
announcement_id INT PRIMARY KEY AUTO_INCREMENT,
announcer_id INT NOT NULL,
title VARCHAR(200) NOT NULL,
content TEXT NOT NULL,
FOREIGN KEY (announcer_id) REFERENCES user(user_id) ON DELETE
CASCADE
);
3.4. SQL DML Statements (Data Manipulation)
These statements demonstrate how to add, modify, and remove records within the
system.
3.4.1. INSERT Statements
Insert Skills
INSERT INTO skills (skill_name, category, description) VALUES
('Python', 'programming', 'Python programming language'),
('Java', 'programming', 'Java programming language'),
('JavaScript', 'programming', 'JavaScript for web development'),
('React', 'programming', '[Link] framework'),
('[Link]', 'programming', '[Link] runtime'),
('MySQL', 'programming', 'MySQL database'),
('Communication', 'soft_skill', 'Verbal and written communication');
21
Insert Users
Admin user (password: admin123)
INSERT INTO users (username, password, email, full_name, role,
is_active) VALUES
('admin', 'admin123', 'admin@[Link]', 'System Administrator',
'admin', TRUE);
Teachers
INSERT INTO users (username, password, email, full_name, role,
department, major, bio) VALUES
('[Link]', 'password123', '[Link]@[Link]', 'Dr. John Smith',
'teacher', 'CS', 'Computer Science', 'Professor of Computer Science with 15 years
experience in AI and Machine Learning.'),
('[Link]', 'password123', '[Link]@[Link]', 'Prof. Sarah
Jones', 'teacher', 'IT', 'Information Technology', 'Head of IT Department.
Specializes in Cybersecurity.');
Senior Students
INSERT INTO users (username, password, email, full_name, role,
department, major, year, bio) VALUES
('[Link]', 'password123', '[Link]@[Link]', 'Alex Chen',
'senior_student', 'CS', 'Computer Science', 4, 'Final year CS student. President of
Coding Club. Intern at Google.'),
('[Link]', 'password123', '[Link]@[Link]', 'Lisa Wong',
'senior_student', 'CS', 'Computer Science', 4, 'AI/ML enthusiast. Research
assistant in AI lab.'),
('[Link]', 'password123', '[Link]@[Link]', 'James Lee',
'senior_student', 'IT', 'Information Technology', 4, 'Cybersecurity specialist. CTF
team captain.');
22
Junior Students
INSERT INTO users (username, password, email, full_name, role,
department, major, year, bio) VALUES
('[Link]', 'password123', '[Link]@[Link]', 'Kevin Ng',
'junior_student', 'CS', 'Computer Science', 2, 'Second year CS student. Learning
Python and web development.'),
('[Link]', 'password123', '[Link]@[Link]', 'Nina Singh',
'junior_student', 'IT', 'Information Technology', 1, 'Freshman IT student. Excited
to learn programming.');
Insert sample events
INSERT INTO events (title, description, event_type, mode, organizer_id,
start_date, start_time, max_participants, location) VALUES
('Python Workshop for Beginners', 'Learn Python from scratch in this hands-on
workshop. Topics include variables, loops, functions, and basic projects.',
'workshop', 'online', 2, DATE_ADD(CURDATE(), INTERVAL 7 DAY),
'14:00:00', 50, 'Zoom'),
('Web Development Bootcamp', 'Intensive session on modern web development
with HTML, CSS, and JavaScript.', 'workshop', 'offline', 3,
DATE_ADD(CURDATE(), INTERVAL 14 DAY), '10:00:00', 30, 'Lab 201'),
('AI & Machine Learning Seminar', 'Introduction to AI and ML concepts. Real-
world applications and career opportunities.', 'seminar', 'hybrid', 2,
DATE_ADD(CURDATE(), INTERVAL 21 DAY), '15:30:00', 100, 'Auditorium
A'),
('Hackathon 2024', '24-hour coding competition. Build innovative solutions for
real-world problems.', 'hackathon', 'offline', 3, DATE_ADD(CURDATE(),
INTERVAL 30 DAY), '09:00:00', 200, 'Sports Complex');
Insert event participation
23
INSERT INTO event_participation (event_id, user_id, registration_at,
attendance_status) VALUES
(1, 3, '2026-03-31 10:30:00', 'registered'),
(2, 3, '2026-03-31 10:35:00', 'registered'),
(1, 6, '2026-04-01 09:00:00', 'registered'),
(3, 3, '2026-04-01 09:15:00', 'registered'),
(4, 6, '2026-04-01 09:20:00', 'registered'),
(5, 6, '2026-04-01 09:25:00', 'registered'),
(2, 2, '2026-04-01 10:00:00', 'registered');
Insert sample announcements
INSERT INTO announcements (title, content, announcer_id, category, priority)
VALUES
('Welcome to Mentorship Hub', 'We are excited to launch our new mentorship
platform! All students and teachers are encouraged to create profiles and
connect.', 1, 'general', 'high'),
('Python Workshop Registration Open', 'Registration for Python Workshop is
now open. Limited seats available!', 2, 'event', 'medium'),
('Hackathon 2024 Announced', 'Get ready for our annual hackathon. Form teams
and start brainstorming!', 3, 'event', 'high'),
('New AI Feedback Feature', 'Check out our new AI-powered recommendations
to enhance your learning journey.', 1, 'general', 'medium');
Insert sample mentorship requests
INSERT INTO mentorship_requests (mentor_id, mentee_id, subject, message,
status) VALUES
24
(2, 7, 'Help with Python basics', 'I am a beginner in Python and would love to
learn from you. Can you help me understand loops and functions?', 'pending'),
(3, 8, 'Cybersecurity career advice', 'I am interested in cybersecurity. Can you
guide me on learning path and certifications?', 'accepted'),
(4, 7, 'Web development mentorship', 'Want to become a web developer. Need
guidance on where to start.', 'pending');
3.4.2. UPDATE Statements
Update user profile (change major)
UPDATE user SET major = 'Data Science' WHERE user_id = 3;
Update user bio
UPDATE user SET bio = 'Second year student passionate about AI and Machine
Learning' WHERE user_id = 3;
Update skill category
UPDATE skill SET category = 'web' WHERE skill_name = 'Web Development';
Update mentorship request status (accept a request)
UPDATE mentorship_request SET status = 'accepted' WHERE request_id = 1;
Update multiple mentorship requests
UPDATE mentorship_request SET status = 'rejected' WHERE mentee_id = 6
AND status = 'pending';
Update event details
UPDATE event SET start_date = '2026-04-16', max_participant = 60
WHERE event_id = 1;
25
Update event platform
UPDATE event SET platform = 'Zoom Meeting' WHERE event_id = 2;
Update event participation status
UPDATE event_participation SET attendance_status = 'attended' WHERE
event_id = 1 AND user_id = 3;
Update multiple participation records
UPDATE event_participation SET attendance_status = 'attended' WHERE
user_id = 3 AND attendance_status = 'registered';
Update announcement content
UPDATE announcement SET content = 'Python Workshop for Beginners -
Register now! Seats are filling fast.' WHERE announcement_id = 2;
Update user password (when user changes password)
UPDATE user SET password = 'newpassword123' WHERE user_id = 3;
Update user role (promote senior student to teacher)
UPDATE user SET role = 'teacher' WHERE user_id = 2 AND role =
'senior_student';
Update event status (mark as completed after event ends)
UPDATE event SET status = 'completed' WHERE start_date < CURDATE();
Update event participation (cancel registration)
UPDATE event_participation SET attendance_status = 'cancelled' WHERE
event_id = 2 AND user_id = 3;
Update skill name
26
UPDATE skill SET skill_name = 'Python Programming' WHERE skill_id = 1;
3.4.3 DELETE Statements
Delete a single mentorship request
DELETE FROM mentorship_request WHERE request_id = 3;
Delete all rejected mentorship requests
DELETE FROM mentorship_request WHERE status = 'rejected';
Delete a user's event participation
DELETE FROM event_participation WHERE event_id = 1 AND user_id = 3;
Delete all event participation for a specific user
DELETE FROM event_participation WHERE user_id = 6;
Delete an event
DELETE FROM event WHERE event_id = 5;
3.5. SQL Queries (Data Retrieval)
List all mentors (teachers and senior students)
SELECT user_id, user_name, role, major, bio
FROM user
WHERE role IN ('teacher', 'senior_student');
Find mentors by skill
27
SELECT u.user_id, u.user_name, [Link], s.skill_name
FROM user u
JOIN user_skill us ON u.user_id = us.user_id
JOIN skill s ON us.skill_id = s.skill_id
WHERE s.skill_name = 'Python' AND [Link] IN ('teacher', 'senior_student');
List pending requests for a mentor
SELECT r.request_id, [Link], [Link], u.user_name AS mentee_name
FROM mentorship_request r
JOIN user u ON r.mentee_id = u.user_id
WHERE r.mentor_id = 1 AND [Link] = 'pending';
List events with participant count
SELECT e.event_id, [Link], e.start_date, e.max_participant,
COUNT(ep.user_id) AS registered_count
FROM event e
LEFT JOIN event_participation ep ON e.event_id = ep.event_id
GROUP BY e.event_id;
Get events a user is registered for
SELECT e.event_id, [Link], e.start_date, ep.attendance_status
FROM event e
JOIN event_participation ep ON e.event_id = ep.event_id
WHERE ep.user_id = 3;
28
Get all announcements
SELECT a.announcement_id, [Link], [Link], u.user_name AS announcer_name
FROM announcement a
JOIN user u ON a.announcer_id = u.user_id
ORDER BY a.announcement_id DESC;
3.6. Sample Data
Below is the realistic sample data represented in table format as required by the
project template.
Table 3.6.1 User Table
User Password Email Role Major
User_Name
_Id
teacher1@[Link] teacher Computer
1 teacher1 password123
.mm Science
senior1@[Link]. senior_st Computer
2 senior1 password123
mm udent Science
junior1@[Link]. junior_st Computer
3 junior1 password123
mm udent Science
senior2@[Link]. senior_st Information
4 senior2 password123
mm udent Technology
junior2@[Link]. junior_st Information
5 junior2 password123
mm udent Technology
Table 3.6.2 Skill Table
Skill_id Skill_name Category
1 Python programming
2 Java programming
3 Cybersecurity security
4 Machine
ai
Learning
5 Communication soft_skill
Table 3.6.3 Mentorship_request Table
29
Request Mentor Mentee Subject Message Status
_id _Id _Id
Python Need help with
1 1 3 pending
Assistance loops and functions
Want to learn web
Web Dev
2 2 3 development, where accepted
Guidance
to start?
Need guidance on
Programming
3 1 6 programming pending
Basics
fundamentals
What career options
4 4 6 IT Career Path accepted
in IT?
Interested in
Cybersecurity
5 5 6 security, need pending
Intro
guidance
Table 3.6.4 Event Table
Event User Event_ Max_
Title Platform Start_date
_id _id type Participants
SQL
1 1 Seminar Zoom 2026-04-15 30
Workshop
Google
2 2 AI in 2026 Webinar 2026-05-10 100
Meet
3 1 Career Fair Seminar Physical 2026-06-01 200
Cybersecurity
Worksh Microsoft
4 5 Workshop 2026-05-05 35
op Teams
Basic
Database Worksh
5 4 Zoom 2026-04-25 40
Design op
Table 3.6.5 Event_Participation Table
Participant_i Registration_at Attendance_status
User_Id Event_id
d
1 2 1 2026-03-25 Present
2 3 6 2026-03-26 Present
3 1 5 2026-04-01 Present
4 4 2 2026-04-01 Present
5 2 4 2026-04-01 Present
30
Table 3.6.6: announcement Table
Announcement_i Content
User_Id Title
d
We are excited to launch our
Welcome to new mentorship platform!
1 1 Mentorship All students and teachers are
Hub encouraged to create profiles
and connect with mentors.
Python Workshop for
Python
beginners will be held on
2 2 Workshop
April 15. Register now!
Registration
Limited seats available.
Database New workshop added! Learn
3 1 Design database design from basics.
Workshop Join us on April 25.
Join us for a career guidance
Career in IT
4 4 session with industry
Seminar
professionals on April 28.
Learn about cybersecurity
Cybersecurity basics and career
5 5
Workshop opportunities. Workshop on
May 5.
31
Chapter 4
Conclusion
This project focused on the design and implementation of a database system for
Mentorship Hub for Polytechnic Students, an academic support platform that connects
teachers, senior students, and junior students.
The project began with requirement analysis, where we identified the system's
main users, processes, and data requirements. We identified entities such as User, Skill,
MentorshipRequest, Message, Event, and Announcement, along with their attributes and
relationships. The Entity-Relationship (ER) diagram was then constructed to visually
represent the structure of the system, including entities, attributes, primary keys,
relationships, and cardinality.
Following the ER diagram, we converted it into a relational schema consisting of
nine tables. Each table was designed with appropriate data types, primary keys, foreign
keys, and constraints to ensure data integrity. The tables were normalized to eliminate
redundancy and ensure consistency.
SQL statements were developed for:
Creating the database and tables (DDL)
Manipulating data with INSERT, UPDATE, and DELETE operations (DML)
Retrieving meaningful information using SELECT queries with JOIN, WHERE,
GROUP BY, and ORDER BY clauses
Sample data was provided to demonstrate the functionality of the system.
What We Learned:
How to analyze a real-world system and identify entities, attributes, and
relationships
32
How to design an ER diagram with proper cardinality and participation
How to convert an ER diagram into a relational schema
How to implement a database using SQL with proper constraints
How to write queries to retrieve meaningful information
Challenges Faced:
Identifying the correct relationships between entities, especially the many-to-
many relationship between users and skills
Determining appropriate data types and constraints for each attribute
Writing SQL queries that correctly join multiple tables
Future Improvements:
Implement user authentication and session management
Add real-time messaging functionality
Integrate with calendar applications for session scheduling
Develop a web-based interface for broader accessibility
Add notification system for request updates and event reminders
Implement rating and review system for completed mentorships
Through this project, we gained practical experience in database design, data modeling,
and SQL implementation, which are essential skills for developing efficient and scalable
database systems.
33