Group Project DB
Group Project DB
Group Project DB
Semester 1, 2022/2023
Section : 2
Group Members
NAME MATRIC NO
Supervised by
Dr. Atikah Balqis Binti Basri
TABLE OF CONTENT
NO CONTENTS PAGE
1. REPORT 2-11
1.1. INTRODUCTION 2
1
1.1 Introduction
Our team is working on an I-Mac Management System project that will provide a centralised
system for storing and organising information on the programs, activities, and students engaged
in these programmes. The system presently handles programme registration, student registration,
allocating funds, and tracking status manually. The I-Mac Management System replaces some
manual operations with a computerised system that harvests data, enhances student service, and
reduces operational expenses.
2
1.3 Entities And Attributes
● Entity: Program
Attributes: program_id (varchar, primary key), purpose (varchar), program_name
(varchar), kulliyyah_id (varchar, foreign key), status (varchar)
● Entity: Activity
Attributes: activity_id (varchar, primary key), program_id (varchar, foreign key),
activity_name (varchar), act_date (date),start_time(varchar),end_time(varchar), purpose
(varchar), pic_id (varchar, foreign key), status(varchar).
● Entity: Kulliyyah
Attributes: kulliyyah_id (varchar, primary key), kulliyyah_name (varchar),
contact_details (varchar)
● Entity: Person_in_charge
Attributes: pic_id (varchar, primary key), pic_name (varchar), contact_details (varchar),
kulliyah_id (varchar, foreign key)
● Entity: DSU
Attributes: dsu_id (varchar, primary key), contact_details (varchar), policies_procedures
(varchar)
● Entity: Student
Attributes: student_id (varchar, primary key), student_name (varchar), contact_details
(varchar)
● Entity: Funding
Attributes:funding_id(varchar,primary key), program_id (varchar, primary key, foreign
key), dsu_id (varchar,foreign key), amount (decimal), approved (varchar)
● Entity: Feedback
Attributes: feedback_id (varchar, primary key), program_id (varchar, foreign
key),student_id(varchar,foreign key), score(number), comments(varchar)
● Entity: Registration
Attributes: registration_id(varchar,primary key), student_id(varchar,foreign key),
activity_id(varchar,foreign key).
3
1.4 Business Rules
● Each Kulliyyah is allowed to register for the IIUM Ibn Ummi Maktum Club (I-MaC) and
create a maximum of two programs per year.
● For each program, the Kulliyyah must provide a list of activities that includes details such
as the purpose, name, date, and time.
● There must be one person in charge assigned for each activity.
● Every activity must be approved by the DSU before it can be promoted and offered to
students in the short semester.
● The DSU will allocate funding for approved programs, with a maximum amount of RM
15,000. The amount granted is based on the estimated budget proposed by the Kulliyyah.
● The DSU will assess the budget proposal based on the type and number of planned
activities.
● The DSU will track the progress of each program and activity and record any feedback or
evaluation provided by participants.
● The DSU will record and track the number of participants with disabilities in each
program and activity.
4
1.5 ER/EER Diagram
5
1.6 Relation scheme
● Registration(registration_id,student_id, activity_id)
6
1.7 Data Dictionary (METADATA)
Programs
Kulliyyah
7
Person_in_charge
DSU
8
Activity
Student
9
Funding
Feedback
10
Registration
11
2.1 SQL script
-- Drop table
DROP TABLE Feedback;
DROP TABLE Registration;
DROP TABLE Funding;
DROP TABLE Student;
DROP TABLE DSU;
DROP TABLE Person_in_charge;
DROP TABLE Kulliyyah;
DROP TABLE Activity;
DROP TABLE Program;
-- Create table
CREATE TABLE Kulliyyah (
kulliyyah_id varchar(10) PRIMARY KEY ,
kulliyyah_name VARCHAR(255) NOT NULL,
contact_details VARCHAR(255) NOT NULL
);
12
student_id varchar(10) PRIMARY KEY,
student_name VARCHAR(255) NOT NULL,
contact_details VARCHAR(255) NOT NULL
);
-- INSERT VALUES
INSERT ALL
INTO Kulliyyah values('K1','Engineering','engineering@iium.edu.my')
INTO Kulliyyah values('K2','Law','law@iium.edu.my')
INTO Kulliyyah values('K3','Medicine','medicine@iium.edu.my')
INTO Kulliyyah values('K4','HS','hs@iium.edu.my')
INTO Kulliyyah values('K5','IT','it@iium.edu.my')
select * from dual;
INSERT ALL
INTO Person_in_charge values('P101','Ahmad','ahmad@iium.edu.my','K1')
INTO Person_in_charge values('P102','Sarah','sarah@iium.edu.my','K2')
INTO Person_in_charge values('P103','Ali','ali@iium.edu.my','K3')
INTO Person_in_charge values('P104','Abu','abu@iium.edu.my','K4')
13
INTO Person_in_charge values('P105','Aminah','aminah@iium.edu.my','K5')
select * from dual;
INSERT ALL
INTO DSU values('D1','dsu@iium.edu.my',
'https://www.iium.edu.my/dsu/policies')
select * from dual;
INSERT ALL
INTO Student values('S1','Amir', 'amir@iium.edu.my')
INTO Student values('S2','Syafina', 'syafina@iium.edu.my')
INTO Student values('S3','Syamsul', 'syamsul@iium.edu.my')
INTO Student values('S4','Syafiq', 'syafiq@iium.edu.my')
INTO Student values('S5','Shahrul', 'shahrul@iium.edu.my')
select * from dual;
INSERT ALL
INTO Program values('PRG1','To provide support and resources for students
with disabilities','I-MaC','K1','Approved')
INTO Program values('PRG2','To promote awareness and understanding of
disability issues','Disability Awareness','K2','Pending')
INTO Program values('PRG3','To provide legal resources and support for
students','Legal Aid Clinic','K3','Approved')
select * from dual;
INSERT ALL
INTO Activity values('ACT1','PRG1','Seminar on Disability
Rights','1-Jan-23','10AM','12PM','To provide information on assistive
technology tools and resources','P101','Completed')
INTO Activity values('ACT2','PRG1','Workshop on Assistive
Technology','2-Jan-21','10AM','12PM','To educate students on disability rights
and advocacy','P102','Completed')
INTO Activity values('ACT3','PRG2','Lecture on stress
management','3-Jan-22','10AM','12PM','To educate students on stress management
techniques','P103','Completed')
INTO Activity values('ACT4','PRG2','Yoga
session','4-Jan-21','10AM','12PM','To promote relaxation and
self-care','P103','Completed')
INTO Activity values('ACT5','PRG3','Legal
clinic','5-Jan-23','10AM','12PM','To provide legal advice and resources to
students','P104','Completed')
select * from dual;
INSERT ALL
INTO Funding values('F1','PRG1','D1',5000,'True')
INTO Funding values('F2','PRG2','D1',7000,'True')
INTO Funding values('F3','PRG3','D1',9000,'True')
select * from dual;
14
INSERT ALL
INTO Registration values ('R1','S1','ACT1')
INTO Registration values ('R2','S2','ACT2')
INTO Registration values ('R3','S3','ACT3')
INTO Registration values ('R4','S4','ACT4')
INTO Registration values ('R5','S5','ACT5')
INTO Registration values ('R6','S1','ACT1')
select * from dual;
INSERT ALL
INTO Feedback values('FB1','PRG1','S1',5,'The workshop was very informative
and the facilitator was knowledgeable')
INTO Feedback values('FB2','PRG1','S2',4,'The support group was helpful,
but I wish it was held more frequently')
INTO Feedback values('F3','PRG2','S3',3,'The lecture was good, but I wish
there were more practical exercises')
INTO Feedback values('FB4','PRG2','S4',4,'The yoga session was relaxing,
but it was too crowded')
INTO Feedback values('FB5','PRG3','S5',4,'The legal clinic was very
helpful, but the wait time was long')
select * from dual;
15
3.1 SQL Queries
1) Show all the Kulliyyah, program details and the list of activities. Show ONLY the
Kulliyyah code, Kulliyyah name, program ID, program name, date of program, activity
ID, activity name, start time, end time.
2) Find the number of programs and the total amount of funding granted by DSU in 2021.
3) Find the names of all programs and the names of their respective in-charge persons
16
4) For each Kulliyyah that had completed their program from 2019 to 2023, find the total
evaluation sum of scores in descending order.
17