0% found this document useful (0 votes)
18 views57 pages

DDD

The Online Examination Management System is designed to facilitate online exams for educational institutions, featuring user roles such as Admin, Instructor, and Student, each with specific functionalities. Key features include secure user authentication, automated grading, exam scheduling, and anti-cheating mechanisms, all aimed at enhancing exam administration efficiency and accessibility. The system prioritizes security, scalability, and user-friendliness, ultimately benefiting both institutions and students by providing real-time results and feedback.

Uploaded by

jr3620
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views57 pages

DDD

The Online Examination Management System is designed to facilitate online exams for educational institutions, featuring user roles such as Admin, Instructor, and Student, each with specific functionalities. Key features include secure user authentication, automated grading, exam scheduling, and anti-cheating mechanisms, all aimed at enhancing exam administration efficiency and accessibility. The system prioritizes security, scalability, and user-friendliness, ultimately benefiting both institutions and students by providing real-time results and feedback.

Uploaded by

jr3620
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

z

PROJECT TITLE : ONLINE EXAMINATION


MANAGEMENT SYSTEM

Submitted by
C.Kiran Kumar Reddy [RA2311026010058]
Ryali Jayanthi Sayi Surya [RA2311026010004]

21CSC205P – DATABASE MANAGEMENT SYSTEM

DEPARTMENT OF COMPUTATIONAL INTELLIGENCE

FACULTY OF ENGINEERING AND TECHNOLOGY

SCHOOL OF COMPUTING

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

KATTANKULATHUR
z

Problem Statement-

The Online Examination Management System is designed to streamline the process of conducting
online exams for educational institutions. It caters to different user roles, including Admin, Instructor,
and Student, each with unique access levels. Admins have full control over the system, enabling them to
manage user accounts, generate reports, and monitor exam activities. Instructors can create exams, set
the structure of questions (multiple-choice, short answer, etc.), configure time limits, and define grading
rules. Students, on the other hand, will log in to take exams, track their performance, and view their
results after completion.

The system provides various features to ensure smooth and secure exam management. It includes secure
user authentication, where each user role has restricted access to specific functionalities. Instructors can
schedule exams with defined start and end times, and the system will lock the exam once the time is up.
Grading is automated for objective-type questions, while subjective questions can be manually graded
by instructors. The platform also incorporates randomization of questions to prevent cheating, and
monitoring features to ensure the integrity of the exam process. Additionally, the system will notify
students about upcoming exams and allow them to resume exams if there are any disruptions in their
internet connection.

Security, scalability, and ease of use are key priorities for the system. The exam data will be encrypted,
and various anti-cheating mechanisms will be in place to maintain fairness. The system will be scalable
to accommodate large numbers of users, ensuring seamless access even during high-traffic periods. The
user interface will be intuitive for all stakeholders, ensuring that students, instructors, and admins can
navigate the system with ease. Ultimately, the Online Examination Management System aims to
improve the efficiency of exam administration, enhance accessibility, and provide real-time results and
feedback, benefiting both educational institutions and their students.

2
z

INTRODUCTION

Security, scalability, and ease of use are key priorities for the system. The exam data will be encrypted,
and various anti-cheating mechanisms will be in place to maintain fairness. The system will be scalable
to accommodate large numbers of users, ensuring seamless access even during high-traffic periods. The
user interface will be intuitive for all stakeholders, ensuring that students, instructors, and admins can
navigate the system with ease. Ultimately, it aims to improve the efficiency of exam administration,
enhance accessibility, and provide real-time results and feedback, benefiting both educational
institutions and their students.

Security and ease of use are fundamental in the design of the Online Examination Management System.
The platform is built with robust authentication protocols, preventing unauthorized access and ensuring
data security. The system also includes features like exam monitoring, question randomization, and
secure result processing to minimize the possibility of cheating or fraud. Additionally, it is designed to
handle high volumes of users simultaneously, making it scalable and reliable. By automating and
digitizing the examination process, the system offers a more efficient, accessible, and fair way to assess
student performance, benefiting both educational institutions and their students.

3
z

ENTITY – RELATIONSHIP MODEL

4
z

ENTITY AND ATTRIBUTE

1.Student

Attributes:

Student_ID (Primary Key)

Name

Date_of_Birth

Email

Contact_Number

Address

Enrollment_Date

Gender

Exam

2.Exam

Attributes:

Exam_ID (Primary Key)

Exam_Name

Duration

Start_Date

End_Date

Total_Marks

Question

3.Questions

Attributes:

Question_ID (Primary Key)

Question_Text

Option_A

5
z

Option_B

Option_C

Option_D

Correct_Option

Answer

4.Answers

Attributes:

Answer_ID (Primary Key)

Student_ID (Foreign Key)

Question_ID (Foreign Key)

Selected_Option

Time_Taken

Result

5.Results

Attributes:

Result_ID (Primary Key)

Student_ID (Foreign Key)

Exam_ID (Foreign Key)

Total_Marks_Obtained

Status (Pass/Fail)

Attempted_Questions

Admin

6.Admin

Attributes:

Admin_ID (Primary Key)

Admin_Name

Email

6
z

Contact_Number

Subject

7.Subject

Attributes:

Subject_ID (Primary Key)

Subject_Name

Subject_Code

Exam_Subject

8.Question_Paper

Attributes:

Paper_ID (Primary Key)

Exam_ID (Foreign Key)

Paper_Name

Creation_Date

9.Time_Slot

Attributes:

Time_Slot_ID (Primary Key)

Exam_ID (Foreign Key)

Slot_Start_Time

Slot_End_Time

10.Feedback

Attributes:

Feedback_ID (Primary Key)

7
z

Exam_ID (Foreign Key)

Student_ID (Foreign Key)

Feedback_Text

Rating

11.Payment

Attributes:

Payment_ID (Primary Key)

Student_ID (Foreign Key)

Amount

Payment_Date

Payment_Status

12. Notification

Attributes:

Notification_ID (Primary Key)

Admin_ID (Foreign Key)

Notification_Text

Notification_Date

13.Attendance

Attributes:

Attendance_ID (Primary Key)

Student_ID (Foreign Key)

Exam_ID (Foreign Key)

Status (Present/Absent)

14.Audit Log

Attributes:

Log_ID (Primary Key)

8
z

User_ID (Foreign Key)

Action_Performed

Timestamp

15.Exam Schedule

Attributes:

Schedule_ID (Primary Key)

Exam_ID (Foreign Key)

Start Time

End TimeExam Mode (Online/Offline)

9
z

CREATING TABLES AND INSERTING VALUES IN TABLES


STUDENT
CREATE TABLE student (

student_id INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(100) NOT NULL,

date_of_birth DATE NOT NULL,

email VARCHAR(100) UNIQUE NOT NULL,

password VARCHAR(255) NOT NULL,

phone VARCHAR(15),

registration_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP

);

INSERT INTO student (name, date_of_birth, email, password, phone) VALUES

('John', '2000-01-15', '[email protected]', 'password123', '1234567890’),

('Jane', '1999-05-22', '[email protected]', 'password456', '0987654321’),

('Alice', '2001-03-30', '[email protected]', 'password789', '1122334455’);

SELECT * FROM student;

10
z

SUBJECT
CREATE TABLE subject (

subject_id INT AUTO_INCREMENT PRIMARY KEY,

subject_name VARCHAR(100) NOT NULL,

subject_code VARCHAR(20) NOT NULL UNIQUE

);

INSERT INTO subject (subject_name, subject_code) VALUES

('Mathematics', 'MATH101’),

('Physics', 'PHYS101’),

('Chemistry', 'CHEM101');

SELECT * FROM subject;

11
z

EXAM
CREATE TABLE exam (

exam_id INT AUTO_INCREMENT PRIMARY KEY,

duration INT NOT NULL,

total_marks INT NOT NULL,

subject_id INT,

FOREIGN KEY (subject_id) REFERENCES subject(subject_id)

);

INSERT INTO exam (duration, total_marks, subject_id) VALUES

(120, 100, 1),

(90, 100, 2),

(60, 100, 3);

SELECT * FROM exam;

12
z

QUESTIONS
CREATE TABLE questions (

question_id INT AUTO_INCREMENT PRIMARY KEY,

exam_id INT,

question_text TEXT NOT NULL,

status ENUM('Active', 'Inactive') NOT NULL,

FOREIGN KEY (exam_id) REFERENCES exam(exam_id)

);

INSERT INTO questions (exam_id, question_text, status) VALUES

(1, 'What is 2 + 2?', 'Active’),

(1, 'What is the square root of 16?', 'Active’),

(2, 'What is Newton\'s second law of motion?', 'Active’),

(3, 'What is the chemical formula for water?', 'Active');

SELECT * FROM questions;

13
z

ANSWER
CREATE TABLE answer (

answer_id INT AUTO_INCREMENT PRIMARY KEY,

question_id INT,

student_id INT,

selected_option VARCHAR(255),

time_taken INT,

FOREIGN KEY (question_id) REFERENCES questions(question_id), FOREIGN KEY (student_id) REFERENCES


student(student_id)

);

INSERT INTO answer (question_id, student_id, selected_option, time_taken) VALUES

(1, 1, '4', 30),

(2, 1, '4', 45),

(3, 2, 'F=ma', 60),

(4, 3, 'H2O', 20);

SELECT * FROM answer;

14
z

PAYMENT
CREATE TABLE payment (

payment_id INT AUTO_INCREMENT PRIMARY KEY,

student_id INT,

amount DECIMAL(10, 2) NOT NULL,

payment_status ENUM('Pending', 'Completed', 'Failed') NOT NULL, FOREIGN KEY (student_id) REFERENCES
student(student_id)

);

INSERT INTO payment (student_id, amount, payment_status) VALUES

(1, 50.00, 'Completed’),

(2, 50.00, 'Completed’),

(3, 50.00, 'Pending');

SELECT * FROM payment;

15
z

FEEDBACK
CREATE TABLE feedback (

feedback_id INT AUTO_INCREMENT PRIMARY KEY,

student_id INT,

exam_id INT,

rating INT CHECK (rating BETWEEN 1 AND 5),

feedback_text TEXT,

FOREIGN KEY (student_id) REFERENCES student(student_id),

FOREIGN KEY (exam_id) REFERENCES exam(exam_id)

);

INSERT INTO feedback (student_id, exam_id, rating, feedback_text) VALUES

(1, 1, 5, 'The exam was well structured.’),

(2, 2, 4, 'I found some questions tricky.’),

(3, 3, 3, 'The exam was too short.');

SELECT * FROM feedback;

16
z

NOTIFICATION
CREATE TABLE notification (

notification_id INT AUTO_INCREMENT PRIMARY KEY,

student_id INT,

notification_text TEXT NOT NULL,

read_status ENUM('Read', 'Unread') NOT NULL,

notification_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (student_id) REFERENCES


student(student_id)

);

INSERT INTO notification (student_id, notification_text, read_status) VALUES

(1, 'Your exam is scheduled for October 15, 2023.', 'Unread’),

(2, 'Your payment has been received.', 'Read’),

(3, 'Please check your exam schedule.', 'Unread');

SELECT * FROM notification;

17
z

RESULT
CREATE TABLE result (

result_id INT AUTO_INCREMENT PRIMARY KEY,

student_id INT,

exam_id INT,

marks INT NOT NULL,

status ENUM('Pass', 'Fail') NOT NULL,

FOREIGN KEY (student_id) REFERENCES student(student_id),

FOREIGN KEY (exam_id) REFERENCES exam(exam_id)

);

INSERT INTO result (student_id, exam_id, marks, status) VALUES

(1, 1, 90, 'Pass’),

(2, 2, 80, 'Pass’),

(3, 3, 70, 'Pass');

SELECT * FROM result;

18
z

SESSION
CREATE TABLE session (

session_id INT AUTO_INCREMENT PRIMARY KEY,

session_name VARCHAR(100) NOT NULL,

start_time DATETIME NOT NULL,

end_time DATETIME NOT NULL

);

INSERT INTO session (session_name, start_time, end_time) VALUES

('2023-2024 Academic Year', '2023-09-01 00:00:00', '2024-06-30 23:59:59');

SELECT * FROM session;

19
z

ATTENDANCE
CREATE TABLE attendance (

attendance_id INT AUTO_INCREMENT PRIMARY KEY,

student_id INT,

exam_id INT,

status ENUM('Present', 'Absent') NOT NULL,

FOREIGN KEY (student_id) REFERENCES student(student_id),

FOREIGN KEY (exam_id) REFERENCES exam(exam_id)

);

INSERT INTO attendance (student_id, exam_id, status) VALUES

(1, 1, 'Present’),

(2, 2, 'Present’),

(3, 3, 'Absent');

SELECT * FROM attendance;

20
z

QUESTION PAPER
CREATE TABLE questionpaper (

paper_id INT AUTO_INCREMENT PRIMARY KEY,

exam_id INT,

number_of_questions INT NOT NULL,

FOREIGN KEY (exam_id) REFERENCES exam(exam_id)

);

INSERT INTO questionpaper (exam_id, number_of_questions) VALUES

(1, 2),

(2, 1),

(3, 1);

SELECT * FROM questionpaper;

21
z

TRIGGERS

Trigger to update payment status

DELIMITER
$$CREATE TRIGGER after_payment_insert
AFTER INSERT ON payment
FOR EACH ROW
BEGIN
IF NEW.amount > 0 THEN
UPDATE payment
SET payment_status = 'Completed’
WHERE payment_id = NEW.payment_id;
END IF;
END $$

22
z

Trigger to update attendance after exam completion

CREATE TRIGGER after_exam_completion


AFTER UPDATE ON exam
FOR EACH ROW
BEGIN
IF OLD.status = 'Scheduled' AND NEW.status = 'Completed' THEN
UPDATE attendance
SET status = 'Present’
WHERE exam_id = NEW.exam_id;
END IF;
END $$

23
z

Trigger to notify exam schedule

DELIMITER $$
CREATE TRIGGER notify_exam_schedule
AFTER INSERT ON exam
FOR EACH ROW
BEGIN
-- Insert a notification to the student about the exam
INSERT INTO notification (student_id, notification_text, read_status)
SELECT student_id, CONCAT('Your exam for subject ‘,
(SELECT name FROM subject WHERE subject_id = NEW.subject_id), ' is
scheduled.'),
'Unread’
FROM student;
24
z

END$$
DELIMITER ;

Trigger to update exam result status if marks < 5

CREATE TRIGGER after_result_update


AFTER UPDATE ON result
FOR EACH ROW
BEGIN
IF NEW.marks < 50 THEN
UPDATE result
SET status = 'Fail’
WHERE result_id = NEW.result_id;
END IF;
END $$
DELIMITER ;

25
z

VIEWS

View for student exam results

CREATE VIEW student_exam_results AS


SELECT s.student_id, s.name, s.email, e.exam_id, e.subject_id, r.marks,
r.status AS result_status
FROM student s
JOIN result r ON s.student_id = r.student_id
JOIN exam e ON r.exam_id = e.exam_id

26
z

View for average feedback ratings for each exam

CREATE VIEW exam_feedback AS


SELECT f.exam_id, e.subject_name, AVG(f.rating) AS average_rating
FROM feedback f
JOIN exam e ON f.exam_id = e.exam_id
GROUP BY f.exam_id;

27
z

View for student payment status

CREATE VIEW student_payment_status AS


SELECT s.student_id,
s.name,
s.email,
COALESCE(SUM(p.amount), 0) AS total_paid,
-- Use a subquery to get the latest payment status
(SELECT p2.payment_status
FROM payment p2
WHERE p2.student_id = s.student_id
ORDER BY p2.payment_id DESC LIMIT 1) AS payment_status
28
z

FROM student s
LEFT JOIN payment p ON s.student_id = p.student_idGROUP
BY s.student_id, s.name, s.email;

View for no. of questions in each paper

CREATE VIEW active_exam_questionpapers AS


SELECT e.exam_id, e.subject_id, qp.paper_id, qp.number_of_questions
FROM exam e
JOIN questionpaper qp ON e.exam_id = qp.exam_id
WHERE e.status = 'Active';

29
z

CURSORS

Cursor to process all student results

DELIMITER $$
CREATE PROCEDURE process_student_results()
BEGIN
30
z

DECLARE done INT DEFAULT 0;


DECLARE student_id INT;
DECLARE exam_id INT;
DECLARE marks INT;
DECLARE result_cursor CURSOR FOR
SELECT student_id, exam_id, marks FROM result;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN result_cursor;
read_loop: LOOP
FETCH result_cursor INTO student_id, exam_id, marks;
IF done THEN
LEAVE read_loop;
END IF;
Process each student result (just printing for example)
SELECT CONCAT('Processing student ', student_id, ' for exam ', exam_id, '
with marks ', marks);
END LOOP;
CLOSE result_cursor;
END $$

31
z

Cursor to process all pending payments


CREATE PROCEDURE process_pending_payments()
BEGIN

32
z

DECLARE done INT DEFAULT 0;


DECLARE payment_id INT;
DECLARE student_id INT;
DECLARE amount DECIMAL(10, 2);
DECLARE payment_cursor CURSOR FOR
SELECT payment_id, student_id, amount FROM payment WHERE
payment_status = 'Pending’;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN payment_cursor;
read_loop: LOOP
FETCH payment_cursor INTO payment_id, student_id, amount;
IF done THEN
LEAVE read_loop;
END IF;
Process each pending payment (e.g., update payment status to 'Completed')
UPDATE payment
SET payment_status = 'Completed’
WHERE payment_id = payment_id;
SELECT CONCAT('Payment processed for student ', student_id, ' of
amount ', amount);
END LOOP;
CLOSE payment_cursor;
END
$$DELIMITER ;
33
z

34
z

FUNCTIONAL DEPENDENCIES

Student:
student_id → name, date_of_birth, email, password, phone, registration_date
email → student_id, name, date_of_birth, password, phone, registration_date

Subject:
subject_id → subject_name, subject_code
subject_code → subject_id, subject_name

35
z

Exam:
exam_id → duration, total_marks, subject_id, status
exam_id → subject_id implies: subject_id → subject_name, subject_code via
FK relationship

Questions:
question_id → exam_id, question_text, status
exam_id + question_text → question_id

36
z

Answers:
answer_id → question_id, student_id, selected_option, time_taken
question_id + student_id → answer_id, selected_option, time_taken

Payment:
payment_id → student_id, amount, payment_status
student_id + payment_id → amount, payment_status

37
z

Feedback:
feedback_id → student_id, exam_id, rating, feedback_text
student_id + exam_id → feedback_id, rating, feedback_text

Notification:
notification_id → student_id, notification_text, read_status, notification_date

38
z

Result:
result_id → student_id, exam_id, marks, status
student_id + exam_id → result_id, marks, status

Session:
session_id → session_name, start_time, end_time

Attendance:
attendance_id → student_id, exam_id, status

39
z

student_id + exam_id → attendance_id, status

Question Paper:
paper_id → exam_id, number_of_questions
exam_id → paper_id, number_of_questions

NORMALIZATION

1ST NORMAL FORM- STUDENT

40
z

Unnormalised Table

NORMALISED TABLE:
CREATE TABLE student (

student_id INT,

name VARCHAR(100),

date_of_birth DATE,

emails TEXT, -- Storing multiple emails separated by commas (violation)

phones TEXT, -- Storing multiple phone numbers in one field (violation)

password VARCHAR(255),

registration_date TIMESTAMP

);

INSERT INTO student (student_id, name, date_of_birth, password, registration_date)

VALUES

(1, 'John Doe', '2000-01-15', 'password123', NOW()),

(2, 'Jane Smith', '1999-05-22', 'password456', NOW()),

(3, 'Alice Johnson', '2001-03-30', 'password789', NOW());

select * from student;

41
z

CREATE TABLE student (

student_id INT,

name VARCHAR(100),

date_of_birth DATE,

emails TEXT, -- Storing multiple emails separated by commas (violation)

phones TEXT, -- Storing multiple phone numbers in one field (violation)

password VARCHAR(255),

registration_date TIMESTAMP

);

INSERT INTO student (student_id, emails)

VALUES

(1, '[email protected]'),

(1, '[email protected]'),

(2, '[email protected]'),

(3, '[email protected]'),

(3, '[email protected]');

select * from student;

CREATE TABLE student (

student_id INT,

name VARCHAR(100),

date_of_birth DATE,

emails TEXT, -- Storing multiple emails separated by commas (violation)


42
z

phones TEXT, -- Storing multiple phone numbers in one field (violation)

password VARCHAR(255),

registration_date TIMESTAMP

);

INSERT INTO student(student_id, phones)

VALUES

(1, '1234567890'),

(1, '0987654321'),

(2, '9876543210'),

(3, '1122334455'),

(3, '2233445566');

select * from student;

2nd NORMAL FORM-EXAM


CREATE TABLE student_exam_UNF (

student_id INT,

exam_id INT,

student_name VARCHAR(100), -- Violates 2NF (depends only on student_id)

exam_subject VARCHAR(100), -- Violates 2NF (depends only on exam_id)

marks INT,

PRIMARY KEY (student_id, exam_id)

);

INSERT INTO student_exam_UNF (student_id, exam_id, student_name, exam_subject, marks)

43
z

VALUES

(1, 101, 'John Doe', 'Mathematics', 85),

(1, 102, 'John Doe', 'Physics', 78),

(2, 101, 'Jane Smith', 'Mathematics', 92),

(2, 103, 'Jane Smith', 'Chemistry', 88);

select * from student_exam_UNF;

NORMALISED TABLES:
CREATE TABLE student_exam_UNF (

student_id INT,

exam_id INT,

student_name VARCHAR(100), -- Violates 2NF (depends only on student_id)

exam_subject VARCHAR(100), -- Violates 2NF (depends only on exam_id)

marks INT,

PRIMARY KEY (student_id, exam_id)

);

INSERT INTO student (student_id, student_name) VALUES

(1, 'John Doe'),

(2, 'Jane Smith');

44
z

CREATE TABLE student_exam_UNF (

student_id INT,

exam_id INT,

student_name VARCHAR(100), -- Violates 2NF (depends only on student_id)

exam_subject VARCHAR(100), -- Violates 2NF (depends only on exam_id)

marks INT,

PRIMARY KEY (student_id, exam_id)

);

INSERT INTO exam (exam_id, exam_subject) VALUES

(101, 'Mathematics'),

(102, 'Physics'),

(103, 'Chemistry');

CREATE TABLE student_exam_UNF (

student_id INT,

exam_id INT,
45
z

student_name VARCHAR(100), -- Violates 2NF (depends only on student_id)

exam_subject VARCHAR(100), -- Violates 2NF (depends only on exam_id)

marks INT,

PRIMARY KEY (student_id, exam_id)

);

INSERT INTO student_exam (student_id, exam_id, marks) VALUES

(1, 101, 85),

(1, 102, 78),

(2, 101, 92),

(2, 103, 88);

46
z

3RD NORMAL FORM – DEPARTMENT


Unnormalised Table:
CREATE TABLE student_department_UNF (

student_id INT PRIMARY KEY,

student_name VARCHAR(100),

department_id INT,

department_name VARCHAR(100), -- depends on department_id, not student_id

department_location VARCHAR(100) -- also depends on department_id

);

INSERT INTO student_department_UNF (student_id, student_name, department_id, department_name,


department_location)

VALUES

(1, 'Alice', 101, 'Computer Science', 'Block A'),

(2, 'Bob', 102, 'Mathematics', 'Block B'),

(3, 'Charlie', 101, 'Computer Science', 'Block A'),

(4, 'David', 103, 'Physics', 'Block C'),

(5, 'Eve', 102, 'Mathematics', 'Block B');

47
z

Normalised Tables:
CREATE TABLE student (

student_id INT PRIMARY KEY,

student_name VARCHAR(100),

department_id INT,

FOREIGN KEY (department_id) REFERENCES department(department_id)

);

INSERT INTO department (department_id, department_name, department_location) VALUES

(101, 'Computer Science', 'Block A'),

(102, 'Mathematics', 'Block B'),

(103, 'Physics', 'Block C');

CREATE TABLE department (

48
z

department_id INT PRIMARY KEY,

department_name VARCHAR(100),

department_location VARCHAR(100)

);

INSERT INTO student (student_id, student_name, department_id) VALUES

(1, 'Alice', 101),

(2, 'Bob', 102),

(3, 'Charlie', 101),

(4, 'David', 103),

(5, 'Eve', 102);

4TH NORMAL FORM – SKILLS


Unnormalised table:
CREATE TABLE student_skills_hobbies_UNF (

student_id INT PRIMARY KEY,

student_name VARCHAR(100),
49
z

skills VARCHAR(255), -- comma-separated list (multi-valued)

hobbies VARCHAR(255) -- comma-separated list (multi-valued)

);

INSERT INTO student_skills_hobbies_UNF (student_id, student_name, skills, hobbies)

VALUES

(1, 'Alice', 'Java,Python', 'Reading,Swimming'),

(2, 'Bob', 'C++,JavaScript', 'Chess,Gaming');

Normalised Tables:

CREATE TABLE student (

student_id INT PRIMARY KEY,

student_name VARCHAR(100)

);

INSERT INTO student (student_id, student_name) VALUES

(1, 'Alice'),

(2, 'Bob');

CREATE TABLE student_skill (

student_id INT,

50
z

skill VARCHAR(100),

PRIMARY KEY (student_id, skill),

FOREIGN KEY (student_id) REFERENCES student(student_id)

);

INSERT INTO student_skill (student_id, skill) VALUES

(1, 'Java'),

(1, 'Python'),

(2, 'C++'),

(2, 'JavaScript');

CREATE TABLE student_hobby (

student_id INT,

hobby VARCHAR(100),

PRIMARY KEY (student_id, hobby),

FOREIGN KEY (student_id) REFERENCES student(student_id)

);

INSERT INTO student_hobby (student_id, hobby) VALUES

(1, 'Reading'),

(1, 'Swimming'),

(2, 'Chess'),

(2, 'Gaming');

51
z

5TH NORMAL FORM -


Unnormalised Table:
CREATE TABLE exam_schedule_UNF (

exam_id INT,

invigilator_id INT,

room_id INT,

PRIMARY KEY (exam_id, invigilator_id, room_id)

);

INSERT INTO exam_schedule_UNF (exam_id, invigilator_id, room_id) VALUES

(1, 101, 201),

(1, 101, 202),

(1, 102, 201),

(2, 103, 203),

(2, 104, 203);

52
z

Normalised Tables:
CREATE TABLE exam_invigilator (

exam_id INT,

invigilator_id INT,

PRIMARY KEY (exam_id, invigilator_id)

);

INSERT INTO exam_invigilator (exam_id, invigilator_id) VALUES

(1, 101),

(1, 102),

(2, 103),

(2, 104);

CREATE TABLE exam_room (

exam_id INT,
53
z

room_id INT,

PRIMARY KEY (exam_id, room_id)

);

INSERT INTO exam_room (exam_id, room_id) VALUES

(1, 201),

(1, 202),

(2, 203);

CREATE TABLE invigilator_room (

invigilator_id INT,

room_id INT,

PRIMARY KEY (invigilator_id, room_id)

);

INSERT INTO invigilator_room (invigilator_id, room_id) VALUES

(101, 201),

(101, 202),

(102, 201),

(103, 203),

(104, 203);

54
z

CONCLUSION

The development of the Online Examination Management System using SQL has significantly
improved the efficiency and accuracy of the examination process. By leveraging SQL for data
management, the system ensures secure storage, quick retrieval, and seamless handling of large
volumes of data related to candidates, questions, and results. The automation of key processes such as
exam scheduling, question generation, and result calculation has reduced administrative workload and
minimized human error. Additionally, the system's scalability and security features, including user
authentication and access control, ensure a smooth and secure examination experience. Overall, the
project demonstrates how a well-designed SQL-based system can enhance the reliability, security, and
effectiveness of managing online examinations.

55
z

56

You might also like