0% found this document useful (0 votes)
68 views

Database Management System

This document describes the development of a database management system for Janata Multiple Campus. It identifies key entities like departments, programs, students, lecturers, and subjects. Relationships between these entities are modeled using an entity-relationship diagram. The relational model is then mapped from the ER diagram. The report also includes SQL queries for creating tables and inserting sample data. This system aims to digitize the campus's data management by addressing issues with previous methods like data duplication and lack of backups or reporting.

Uploaded by

yash more
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Database Management System

This document describes the development of a database management system for Janata Multiple Campus. It identifies key entities like departments, programs, students, lecturers, and subjects. Relationships between these entities are modeled using an entity-relationship diagram. The relational model is then mapped from the ER diagram. The report also includes SQL queries for creating tables and inserting sample data. This system aims to digitize the campus's data management by addressing issues with previous methods like data duplication and lack of backups or reporting.

Uploaded by

yash more
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

1

A Project Report on:

Database Management System for Janata Mul ple


Campus

in par al fulfilment for the award of the degree of

Bachelor of Business Management

Silicon Mul ple Campus, Dhangadhi, Kailali

Submi ed by
John Doe (20B1234)
Mary Brown (20C2235)

August 2021

Video Explanation of the sample project


2

Abstract
This report describes the implementa on of a Database Management System for
Janata Mul ple Campus. It was developed for Storing, Managing, and Upda ng
the Data that the Campus generates.

This report mainly includes the background and development process of the
project. The main steps in the development process are iden fying the En es
and the Rela onship among them and presen ng them in graphical form with an
ER Diagram. It also includes some of the SQL queries used in the implementa on
of the MySQL Database.

This project can be useful for JMC and other similar ins tu ons.

Video Explanation of the sample project


3

ACKNOWLEDGEMENTS

We are very pleased to present the report “Database Management System for Janata
Mul ple Campus” which has been prepared for the par al fulfilment of the Bachelor of
Business Management (BBM).

We would like to express our deep gra tude to the report supervisor Lecturer Mr. Alex
for his guidance, and supervision.

We are also thankful to Campus chief Dr. James for advising throughout the en re
semester and the program in charge of BBM, Mr. Peter, for his con nuous support
during the period of the project work.

John Doe (20B1234)


Mary Brown (20C2235)

Silicon Mul ple Campus


BBM 6th Semester

Video Explanation of the sample project


4

Table of Contents

Introduc on ……………………………………………................ 5

Uses of the Project ……………………………………….………. 6

Background ……………………………………………….…….... 7

DBMS for Janata Mul ple Campus ………………………………. 8

Addressing the Requirements …………………………...…….… 9

ER Diagram …….…….…….…….…….…….…….…….……….. 12

Mapping ER Model to Rela onal Model …….…….…….………. 18

Structured Query Language(SQL) …….…….…….…….…….. 25

Table Crea on …….…….…….…….…….…….…….…….……. 26

Data Inser on …….…….…….…….…….…….…….…….……. 39

Summary …….…….…….…….…….…….…….…….…….……. 45

Video Explanation of the sample project


5

Introduc on: DBMS for Janata Mul ple Campus


This project is about the implementa on of a Database Management System in
Janata Mul ple Campus. The project replaces the Tradi onal method of Storing
and Managing Data with a DBMS. This is the first step in the Digi za on of the
Campus.

Problem Statement
Currently, JMC uses two methods for Managing its Database.
● Tradi onal Pen and Paper Method
● File Management System in Computer

The main issues caused by this approach are:

Duplica on of Data
The Records of the Students are being Duplicated in Accounts, Library and other
Departments.

Update Issues
The updates have to be done in mul ple places and there is no proper system to
check if it is updated correctly everywhere.

Lack of Report Genera on


The Report Genera on is done manually which is very me-consuming and prone
to mistakes.

No Backup
There is no backup system which means the Campus is always at a risk of losing
Data completely or par ally.

Security and Privacy Issues


The Records are exposed to all the employees in all Departments.

Video Explanation of the sample project


6

Uses of the Project


The project can be used to:

● Maintain a Database of Departments, Courses, Teachers, and other


Employees of the Campus.
● Enter Data for exis ng Students as well as the ones who enroll in the future.
● Update the Data on a regular basis.
● Report Genera on of Students, Teachers, and several other Reports.
● Take Backups of complete Database on a regular basis.

Besides, this project can also be used to Integrate the Data with an MIS
Applica on in the future.

Video Explanation of the sample project


7

Background
The project uses the following technologies.

DBMS: MySQL
MySQL is an open-source rela onal database management system (RDBMS).

We have selected MySQL because of the following reasons:

● MySQL supports the Standard SQL(Structured Query Language).


● It is easy to use and easily available to download and install.
● MySQL clients like phpMyAdmin and MySQL Workbench are easily
available for installa on. They provide a great user experience.
● It is portable to other systems.
● There are no Licensing fees. So, we can use it free of cost.
● Being an Open Source so ware, it has a huge community to support if you
run into issues.

XAMPP
XAMPP is a stack of so ware that provides easy access to MySQL.

phpMyAdmin
phpMyAdmin is an open-source client for MySQL. It provides the func onality of
opera ng and managing Databases in MySQL.

Books
For understanding the theory of DBMS and SQL, we took the following books for
reference.

1. Saud, A.S and Saud, B.S (2073). Introduc on to Database System. Kri Books
Publishers & Distributors Pvt. Ltd., 2nd ed
2. Abraham Silberchatz, Henry F. Korth, S.Sudarshan; Database System
Concepts. McGraw Hill, 6th ed

Video Explanation of the sample project


8

DBMS for Janata Mul ple Campus


The development of the Schema for RDBMS started with the En ty-Rela onship
Model(ER Model). Then the ER Model was mapped to the Rela onal Model.

En ty-Rela onship Model


The En ty-Rela onship Model (ER Model) is used to describe the structure of the
Database. It takes into account the following:

● En es and En ty Sets
● The A ributes of those En es
● Rela onships among those En es

ER Diagram
The core of the ER Model is the En ty-Rela onship Diagram (ER Diagram), a
graphical representa on of the ER model. It is like a blueprint of a database.

Video Explanation of the sample project


9

Addressing the Requirements


The first step in the ER Model is to Iden fy the En es of the System or
Organiza on that we are interested in.

En es of Janata Mul ple Campus


The en ty is any real-world object having independent existence. An en ty can be
a person, place, or concept. The 5 main En es associated with the Janata
Mul ple Campus are:

1. Department
2. Program
3. Student
4. Lecturer
5. Subject

Video Explanation of the sample project


10

A ributes
The Proper es of an en ty are called A ributes. The a ribute(s) which can
uniquely iden fy the En ty is called Primary Key. The main A ributes of all the
above En es are listed in the table below. The Primary Keys are underlined.

En ty A ributes

Department_Id
Department Department_name
HOD

Program_Id
Program_name
Program No_of_years
Total_fees
Program_coordinator

Student_Id
Roll_no
First_name
Last_name
Gender
Contact_number
Student
Email_address
DOB
Country
City
Street
Ward_no

Lecturer_Id
First_name
Last_name
Gender
Lecturer
Contact_number
Email_address
DOB
Designa on

Video Explanation of the sample project


11

Country
City
Street
Ward_no

Subject_Id
Subject_Code
Subject Subject_name
Credit_hours
Total_Preiods

Video Explanation of the sample project


12

ER Diagram
Note: The diagram is shown stepwise to make it easy to understand. You can
directly put the final ER Diagram in your project.

ER Diagram: Step 1

Video Explanation of the sample project


13

ER Diagram: Step 2

Video Explanation of the sample project


14

ER Diagram: Step 3

Video Explanation of the sample project


15

ER Diagram: Step 4

Video Explanation of the sample project


16

ER Diagram: Step 5

Video Explanation of the sample project


17

ER Diagram: Step 6

Note: Some A ributes of Student and Lecturer en es are not present in the ER Diagram. They
have been excluded to avoid the over-complexity of the ER Diagram.

Video Explanation of the sample project


18

Mapping ER Model to Rela onal Model(Tables)

Step 1: Department and Program


There is a ‘One to Many’ Rela onship between Department and Program. So, we
use Department_Id as a Foreign Key in the Program table.

Department
Department_Id Department_name HOD

Program
Program_Id Program_name No_of_years Total_fees

Program_coordinator Department_Id(FK)

Video Explanation of the sample project


19

Step 2: Lecturer
There is a ‘Many to Many’ Rela onship between the Department and Lecturer. So,
we will create a new table for Works For Rela onship. Also, we will create a
separate table for Contact_number as it has mul ple values.

Lecturer
Lecturer_Id First_name Last_name Gender Email_address DOB Designa on

Country City Street Ward_no

Lecturer_Works_For_Department
Lecturer_Id(FK) Department_Id(FK)

Video Explanation of the sample project


20

Lecturer_Contact_number
Lecturer_Id(FK) Contact_number

Step 3: Student
There is a ‘One to Many’ Rela onship between Program and Student. So, we use
Program_Id as a Foreign Key in the Student table. Also, we will create a separate
table for Contact_number as it has mul ple values.

Video Explanation of the sample project


21

Student
Student_Id Roll_no First_name Last_name Gender Email_address DOB

Country City Street Ward_no Program_Id(FK)

Student_Contact_number
Student_Id(FK) Contact_number

Video Explanation of the sample project


22

Step 4: Subject
There is a ‘Many to Many’ Rela onship between Program and Subject. There is
also a ‘Many to Many’ Rela onship between Lecturer and Subject. So, we will
create two separate tables for Specifies and Teaches Rela onship.

Subject
Subject_Id Subject_Code Subject_name Credit_hours Total_Preiods

Lecturer_Teaches_Subject
Lecturer_Id(FK) Subject_Id(FK)

Program_Has_Subject
Program_Id(FK) Subject_Id(FK)

Video Explanation of the sample project


23

Mapping ER Model to Rela onal Model: Final Rela on Schemas

Department
Department_Id Department_name HOD

Program
Program_Id Program_name No_of_years Total_fees

Program_coordinator Department_Id(FK)

Lecturer
Lecturer_Id First_name Last_name Gender Email_address DOB Designa on

Country City Street Ward_no

Lecturer_Works_For_Department
Lecturer_Id(FK) Department_Id(FK)

Lecturer_Contact_number
Lecturer_Id(FK) Contact_number

Video Explanation of the sample project


24

Student
Student_Id Roll_no First_name Last_name Gender Email_address DOB

Country City Street Ward_no Program_Id(FK)

Student_Contact_number
Student_Id(FK) Contact_number

Subject
Subject_Id Subject_Code Subject_name Credit_hours Total_Preiods

Lecturer_Teaches_Subject
Lecturer_Id(FK) Subject_Id(FK)

Program_Has_Subject
Program_Id(FK) Subject_Id(FK)

Video Explanation of the sample project


25

Structured Query Language(SQL)


We have used the MySQL implementa on of SQL for our project. The main SQL
commands that we used are:

DDL - Data Defini on Language


In DDL, we have used CREATE, ALTER, TRUNCATE, DROP and RENAME commands.

DML - Data Manipula on Language


In DDL, we have used INSERT, UPDATE, DELETE, and SELECT commands.

Video Explanation of the sample project


26

Table Crea on

Department Table

CREATE TABLE Department


(
Department_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Department_name VARCHAR(100) NOT NULL,
HOD VARCHAR(100) NOT NULL
);

Video Explanation of the sample project


27

Program Table
CREATE TABLE Program
(
Program_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Program_name VARCHAR(100) NOT NULL,
No_of_years DECIMAL(2, 2) NOT NULL,
Total_fees DECIMAL(10, 2) NOT NULL,
Program_coordinator VARCHAR(100) NOT NULL,
Department_Id int NOT NULL,
FOREIGN KEY (Department_Id) REFERENCES Department(Department_Id)
);

Video Explanation of the sample project


28

Lecturer Table
CREATE TABLE Lecturer
(
Lecturer_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
First_name VARCHAR(100) NOT NULL,
Last_name VARCHAR(100) NOT NULL,
Gender VARCHAR(15) NOT NULL,
Email_address VARCHAR(320) NOT NULL,
DOB DATE NOT NULL,
Designation VARCHAR(100) NOT NULL,
Country VARCHAR(100) NOT NULL,
City VARCHAR(100) NOT NULL,
Street VARCHAR(100) NOT NULL,
Ward_no int NOT NULL
);

Video Explanation of the sample project


29

Video Explanation of the sample project


30

Lecturer_Works_For_Department Table
CREATE TABLE Lecturer_Works_For_Department
(
Lecturer_Id int NOT NULL,
Department_Id int NOT NULL,
PRIMARY KEY (Lecturer_Id, Department_Id),
FOREIGN KEY (Lecturer_Id) REFERENCES Lecturer(Lecturer_Id),
FOREIGN KEY (Department_Id) REFERENCES Department(Department_Id)
);

Video Explanation of the sample project


31

Lecturer_Contact_number Table

CREATE TABLE Lecturer_Contact_number


(
Lecturer_Id int NOT NULL,
Contact_number VARCHAR(15) NOT NULL,
PRIMARY KEY (Lecturer_Id, Contact_number),
FOREIGN KEY (Lecturer_Id) REFERENCES Lecturer(Lecturer_Id)
);

Video Explanation of the sample project


32

Student Table
CREATE TABLE Student
(
Student_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Roll_no int NOT NULL,
First_name VARCHAR(100) NOT NULL,
Last_name VARCHAR(100) NOT NULL,
Gender VARCHAR(15) NOT NULL,
Email_address VARCHAR(320) NOT NULL,
DOB DATE NOT NULL,
Country VARCHAR(100) NOT NULL,
City VARCHAR(100) NOT NULL,
Street VARCHAR(100) NOT NULL,
Ward_no int NOT NULL,
Program_Id int NOT NULL,
FOREIGN KEY (Program_Id) REFERENCES Program(Program_Id)
);

Video Explanation of the sample project


33

Video Explanation of the sample project


34

Student_Contact_number Table

CREATE TABLE Student_Contact_number


(
Student_Id int NOT NULL,
Contact_number VARCHAR(15) NOT NULL,
PRIMARY KEY (Student_Id, Contact_number),
FOREIGN KEY (Student_Id) REFERENCES Student(Student_Id)
);

Video Explanation of the sample project


35

Subject Table

CREATE TABLE Subject


(
Subject_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Subject_Code VARCHAR(100) NOT NULL,
Subject_name VARCHAR(100) NOT NULL,
Credit_hours int NOT NULL,
Total_Preiods int NOT NULL
);

Video Explanation of the sample project


36

Lecturer_Teaches_Subject Table
CREATE TABLE Lecturer_Teaches_Subject
(
Lecturer_Id int NOT NULL,Subject_Id int NOT NULL,
PRIMARY KEY (Lecturer_Id, Subject_Id),
FOREIGN KEY (Lecturer_Id) REFERENCES Lecturer(Lecturer_Id),
FOREIGN KEY (Subject_Id) REFERENCES Subject(Subject_Id)
);

Video Explanation of the sample project


37

Program_Has_Subject Table

CREATE TABLE Program_Has_Subject


(
Program_Id int NOT NULL,Subject_Id int NOT NULL,
PRIMARY KEY (Program_Id, Subject_Id),
FOREIGN KEY (Program_Id) REFERENCES Program(Program_Id),
FOREIGN KEY (Subject_Id) REFERENCES Subject(Subject_Id)
);

Video Explanation of the sample project


38

Final Tables

Video Explanation of the sample project


39

Data Inser on
Inser ng in Department Table

INSERT INTO `Department`


(`Department_name`,`HOD`)
VALUES ('Science','Alexandra'),
('Commerce','Elizabeth'),
('Arts','Isaac');

SELECT * FROM `Department`

Video Explanation of the sample project


40

Inser ng in Program Table

INSERT INTO `Program`

(`Program_name`,`No_of_years`,`Total_fees`,`Program_coordinator`
,Department_Id`)
VALUES ('BBM',4,400000,'Kimberly',2),
('BBA',4,500000,'David',2),
('BSc General',4,250000,'Edward',1),
('BSc CSIT',4,450000,'Jack',1),
('MSc CSIT',2,200000,'Rachel',1),
('BA English',3,100000,'Leonard',3),
('BA Fne Arts',4,400000,'Victoria',3)

Video Explanation of the sample project


41

SELECT * FROM `Program`;

Video Explanation of the sample project


42

Inser ng in Lecturer Table

INSERT INTO `Lecturer`


(`First_name`,`Last_name`,`Gender`,`Email_address`,`DOB`,
`Designation`,`Country`,
`City`,`Street`,`Ward_no`)
VALUES
('John','Baker','Male','[email protected]','1984-01-24',
'Assist. Lecturer',
'Nepal','Dhangadhi','KMC Road',8),

('William','Bond','Male','[email protected]','1980-02-14',
'Professor',
'Nepal','Dang','Main Road',5),

('Vanessa','Anderson','Female','[email protected]',
'1982-04-04',
'Professor','Nepal','Kathmandu','Old Baneshwor',2);

SELECT * FROM `Lecturer`

Video Explanation of the sample project


43

Inser ng in Lecturer_Works_For_Department Table

INSERT INTO `Lecturer_Works_For_Department`


(`Lecturer_Id`,`Department_Id`)
VALUES (1,1),
(2,1),
(2,3),
(1,3),
(3,1)

Video Explanation of the sample project


44

Inser ng in Lecturer_Contact_number Table

INSERT INTO `Lecturer_Contact_number`


(`Lecturer_Id`,`Contact_number`)
VALUES (1,'12345678'),
(1,'42345678'),
(2,'52345678'),
(3,'14445678'),
(3,'34567812')

… And so on for the other tables

Video Explanation of the sample project


45

Summary

We developed a Database Management System for Janata Mul ple Campus. A er


iden fying the main En es and the Rela onship among them, we created an ER
Model with the help of an ER Diagram. Then we mapped the ER Model to the
Rela onal Model.

Eventually, we used the technologies like MySQL, XAMPP, PhpMyAdmin, etc to


implement the DBMS. We created 10 tables in MySQL. Out of those 10 tables, 5
belonged directly to the en es whereas the remaining 5 were used to manage
the Rela onship among the en es.

Now the Campus can use the DBMS for Storing, Managing, and Upda ng their
data on a regular basis. This will help them get rid of the Data Duplica on,
Inconsistency and many other issues they were facing due to the use of tradi onal
Methods.

The two main limita ons of this project are it lacks rela ons for Library and
Fees/Billing management. This limita on was caused due to the me constraint.
In the future, we plan to enhance the DBMS so that it can properly handle the
data from the college’s Library and Accounts Sec ons.

Video Explanation of the sample project


46

Video Explana on of this sample project is available at the following Link

h ps://bit.ly/4kxR1p6

Video Explanation of the sample project

You might also like