You are on page 1of 23

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI-590 018, KARNATAKA.

DBMS MINI PROJECT REPORT ON

“MUNICIPAL CORPORATION COMPLAINT MANAGEMENT”

PROJECT ASSOCIATES
MAYUR S SAKHARE USN: 4BD18CS043
PRAJWAL S P USN: 4BD18CS061

PROJECT GUIDES:
Prof. Vaishnavi Inamdar Prof. Shryavani K
Department of CS&E, Department of CS&E,
B.I.E.T. Davanagere. B.I.E.T. Davanagere.
Bapuji Institute of Engineering and Technology
Davangere -577004

Department of Computer Science and Engineering

CERTIFICATE

This is to certify that MAYUR S SAKHARE and PRAJWAL SP bearing USN 4BD18CS043 and 4BD18CS061
respectively of Computer Science and Engineering department have satisfactorily submitted the mini project report
entitled “MUNICIPAL CORPORATION COMPLAINT MANAGEMENT” for DATABASE MANAGEMENT SYSTEM
LABORATORY (18CSL58). The report of the mini project has been approved as it satisfies the academic requirements in
respect of mini project work prescribed for the year 2018.

Project Guide Project Guide


Prof. Vaishnavi Inamdar Prof. Shryavani K
Department of CS&E, Department of CS&E,
B.I.E.T., Davanagere. B.I.E.T., Davanagere.

Head of Department
Dr. Nirmala C R Ph.D.,
Prof.& Head, Department of CS&E,
B.I.E.T., Davangere.

Date: 08-01-2021 Signature of Examiners:


Place: Davanagere (1)
(2)
ACKNOWLEDGEMENT

Salutations to our beloved and highly esteemed institute, “BAPUJI INSTITUTE OF ENGINEERING AND
TECHNOLOGY” for having well qualified staff and lab furnished with necessary equipments.
We express my sincere thanks to our guides Prof. Vaishnavi Inamdar & Prof. Shryavani K for giving us constant
encouragement, support and valuable guidance throughout the course of project without whose guidance this
project would not have been achieved.
We express whole hearted gratitude to Dr.Nirmala C R, H.O.D of Computer Science & Engineering
Department. We wish to thank her for making our task easy by providing her valuable help and
encouragement.
We also express our whole hearted gratitude to our principal, Dr. H B Aravind for his moral support and
encouragement.
We would like to extend our gratitude to all staff of Computer Science and Engineering Department for their
help and support. Also we have benefited a lot from the feedback, suggestions given by them.
We would like to extend our gratitude to all my family members and friends especially for their advice and
moral support.

MAYUR S SAKHARE (4BD18CS043)


PRAJWAL SP (4BD18CS061)
ABSTRACT

Providing the citizens the ability to register in the system and then they can send complaint to the
municipality about the services and any issues. And then there is website which facilitates the
communication between municipality and citizens. This will work on mobile devices and computer systems.
Then the user can sign up if he/she is a new user to the website and the user can sign in if he/she has already
visited the website. The website provides the interface that a user can lodge complaints and view the status
of the registered complaint. The main idea of this project is to make use of the existing web infrastructure
and provide an easy,quick,cheap mode of complaint registration by which citizens can save their valuable
time and money.
CONTENTS
CHAPTER 1:- INTRODUCTION Page No
1.1 Introduction 1
1.2 DBMS 2
1.3 PHP 2
1.4 Problem Statement 3
1.5 Objectives 3

CHAPTER 2:- HARWARE AND SOFTWARE REQUIREMENTS


2.1 Hardware tools 5
2.2 Software tools 5

CHAPTER 3:- DESIGN


3.1 ER Diagram 6-7
3.2 Schema Diagram 8

CHAPTER 4:- IMPLEMENTATION


4.1 Code 16-18

CHAPTER 5:- SNAPSHOTS 19-25

CONCLUSION AND FUTURE WORK 26

REFERENCES 27
CHAPTER 1
INTRODUCTION

1.1 Introduction

This project mainly focuses on providing the citizens of a particular city/town to register their complaints
towards the municipal corporation through internet by visiting the website from web browser. This can be
done using mobile phones and computer systems. This process helps citizens to register their complaints
online through their devices which will save the valuable time and money of the citizens.

BACKGROUND and MOTIVATION


The definition of our problem lies in manual system and a fully automated system.
• Manual Process: The system is time consuming. In this process the citizens have to visit the municipal
corporation office personally and register their complaints and it will take lot of time due to heavy crowd.
And again the citizens have to go to the municipal office to enquire about their complaint status.
• Technical system: With the advent of latest technology we can register the complaints right from our
mobile phones and computers by visiting the website . and this will save the valuable time of the citizens
and the citizens can view their complaint status by visiting the website which will save time and money.

1.2 DBMS (DATABASE MANAGEMENT SYSTEM)

Database is a collection of related data and data is a collection of facts and figures that can be processed to
produce information.
Mostly data represents recordable facts. Data aids in producing information, which is based on facts. For
example, if we have data about marks obtained by all students, we can then conclude about toppers and average
marks.
A database management system (DBMS) is a software package designed to define, manipulate, retrieve and
manage data in a database. A DBMS generally manipulates the data itself, the data format, field names, record
structure and file structure. It also defines rules to validate and manipulate this data.
A DBMS relieves users of framing programs for data maintenance. Fourth-generation query languages, such as
SQL, are used along with the DBMS package to interact with a database.
Some other DBMS examples include:
• MySQL
• SQL Server
• Oracle
• dBASE
• FoxPro
1.3 PHP (HYPERTEXT PREPROCESSOR)
PHP is the most popular and widely used server side scripting language for web development. It is used to make
the Dynamic pages in websites. Rasmus Lerdorf was the creator of PHP in 1995. PHP codes are embedding in
HTML source codes for making the page dynamic. PHP can deal with most of the requirements in web
development like Database, File handling, String operations, Arrays, Graphics, File Uploads, Data processing
etc. PHP can be used in any operating system with a web server Supports PHP. Apache web server is one of the
popular web server dealing with PHP + MySQL. Moreover PHP is absolutely free to use.

1.4 Problem Statement

A citizen is signed up for first time by providing the essential details of his/hers and gets. And then the citizen

registers the complaint in the website and that complaint is assigned with a unique complaint id. The complaint

registered by the citizen is displayed in the Admin panel, and then the admin decides whether to accept the

complaint or not. If the admin accepts the complaint request then it will be displayed on the user panel. And if

the admin declines the complaint request then it will be displayed on the citizen panel, in this way a citizen can

register,view the status of the complaint registered.

1.5 Objectives

In today’s competitive world, information plays a vital role in the growth of any industry. Right information
available at the right time makes the decision making process as efficient and effective.

The main objectives of this project are


• To develop an online web-based complaint management system in Municipal corporations that can be
used effectively to save the time and money of the citizens.
• To implement Municipal complaint management system.
CHAPTER 2
REQUIREMENT SPECIFICATION
2.1 Hardware requirements
The hardware required for the development of this project is :
• Processor: Intel Core i3
• Processor speed:1.7 GHz
• RAM:2 GB RAM
• System Type:32/64-Bit Operating System

2.2 Software requirements


The software required for the development of this project is:
• Software:XAMPP
• Operating System:Windows 7 (and other higher version)
• Front End:HTML,CSS
• Programming Language:PHP
• Data Base Environment:MySQL and PHPMyAdmin
• Server: APACHE
CHAPTER 3

DESIGNS

3.1 ENTITY - RELATIONSHIP DIAGRAM

Fig 3.1 : Entity Relationship Diagram of Muncipal Corporation Complaint Management System

Attribute
Entity

Primary Key Relationship Type

3.2 DESCRIPTION
The ER Model figure shows the proposed system. It defines the conceptual view of the database. It works around
real-world entities and the associations among them .At view level, the ER model is considered a good option
for designing databases .So , let’s see each entity
The User
The entity is used by the user to lodges his complaint by loging into the website using his User id and password.
Attributes are U_id,Name, E-mail, Phone, Gender, Password, Aadhar_No, Created_at,Verified_at,and Status

The Notes(Complaint)
The entity gives the description about the complaint. Attributes are id, U_id, note, Created_at, Upated_at,Status.

The Notification
This entity gives the update about any changed changes made by the Admin. Attributes are id,U_id, type,
message, created_at

The Feedback
This entity is used by the user to give the feedback. Attributes are id, C_id, subject, feedback, replied,
created_at

The Subordinate

This entity is used by the admin to assign work with respect to the complaint. Attributes are
S_id,S_name,C_id,Status
3.3 SCHEMA DIAGRAM

Fig 3.3 Schema Diagram for Muncipal Corporation Complaint Management System

3.4 SEVEN STEPS FOR ER TO SCHEMA CONVERSION


Step 1: Mapping of Regular Entity Types.
For each regular (strong) entity type E in the ER schema, create a relation R that includes all the simple attributes
of E. Include only the simple component attributes of a composite attribute. Choose one of the key attributes of
E as the primary key for R. If the chosen key of E is a composite, then the set of simple attributes that form it
will together form the primary key of R. If multiple keys were identified for E during the conceptual design, the
information describing the attributes that form each additional key is kept in order to specify secondary (unique)
keys of relation R. Knowledge about keys is also kept for indexing purposes and other types of analyses.

Step 2: Mapping of Weak Entity Types.

For each weak entity type W in the ER schema with owner entity type E, create a relation
R and include all simple attributes (or simple components of composite attributes) of was attributes of R. In
addition, include as foreign key attributes of R, the primary key attribute(s) of the relation(s) that correspond to
the owner entity type(s); this takes care of mapping the identifying relationship type of W. The primary key of
R is the combination of the primary key(s) of the owner(s) and the partial key of the weak entity type W, if any.
If there is a weak entity type E2 whose owner is also a weak entity type E1, then E1 should be mapped before
E2 to determine its primary key first.
Step 3: Mapping of Binary 1:1 Relationship Types.
For each binary 1:1 relationship type R in the ER schema, identify the relations S and T that correspond to the
entity types participating in R. There are three possible approaches:
1. The foreign key approach.
2. The merged relationship approach, and
The first approach is the most useful and should be followed unless special conditions exist, as we discuss
below.
1. Foreign key approach
Choose one of the relations—S, say—and include as a foreign key in S the primary key of T. It is better to
choose an entity type with total participation in R in the role of S. Include all the simple attributes (or simple
components of composite attributes) of the 1:1 relationship type R as attributes of S.

2. Merged relation approach


An alternative mapping of a 1:1 relationship type is to merge the two entity types and the relationship into a
single relation. This is possible when both participations are total, as this would indicate that the two tables will
have the exact same number of tuples at all times.

3. Cross-reference or relationship relation approach


The third option is to set up a third relation R for the purpose of cross-referencing the primary keys of the two
relations S and T representing the entity types. As we will see, this approach is required for binary M:N
relationships. The relation R is called a relationship relation (or sometimes a lookup table), because each tuple
in R represents a relationship instance that relates one tuple from S with one tuple from T. The relation R will
include the primary key attributes of S and T as foreign keys to S and T. The primary key of R will be one of
the two foreign keys, and the other foreign key will be a unique key of R. The drawback is having an extra
relation, and requiring an extra join operation when combining related tuples from the tables.

Step 4: Mapping of Binary 1:N Relationship Types.


For each regular binary 1:N relationship type R, identify the relation S that represents the participating entity
type at the N-side of the relationship type. Include as foreign key in S the primary key of the relation T that
represents the other entity type participating in R; we do this because each entity instance on the N-side is
related to at most one entity instance on the 1-side of the relationship type. Include any simple attributes (or
simple components of composite attributes) of the 1:N relationship type as attributes of S.
Step 5: Mapping of Binary M:N Relationship Types.
For each binary M:N relationship type R, create a new relation S to represent R. Include as foreign key attributes
in S the primary keys of the relations that represent the participating entity types; their combination will form
the primary key of S. Also include any simple attributes of the M:N relationship type (or simple components of
composite attributes) as attributes of S.
Notice that we cannot represent an M:N relationship type by a single foreign key attribute in one of the
participating relations (as we did for 1:1 or 1:N relationship types) because of the M:N cardinality ratio; we
must create a separate relationship relation S.
Step 6: Mapping of Multivalued Attributes.

For each multivalued attribute A, create a new relation R. This relation R will include an attribute corresponding
to A, plus the primary key attribute K—as a foreign key in R—of the relation that represents the entity type or
relationship type that has A as a multivalued attribute.
The primary key of R is the combination of A and K. If the multivalued attribute is composite, we include its
simple components.

Step 7: Mapping of N-array Relationship Types.


For each n-array relationship type R, where n > 2, create a new relation S to represent R. Include as foreign key
attributes in S the primary keys of the relations that represent the participating entity types. Also include any
simple attributes of the n-array relationship type (or simple components of composite attributes) as attributes of
S. The primary key of S is usually a combination of all the foreign keys that reference the relations representing
the participating entity types. However, if the cardinality constraints on any of the entity types E participating
in R is 1, then the primary key of S should not include the foreign key attribute that references the relation E
corresponding to E.

3.5 DATA BASE DESCRIPTION


Tables

Table 3.5.1: table names of the database

Feedback

Table 3.5.2 : Table description for feedback .


Notes(complaints)

Table 3.5.3:Table description for notes (complaint).


Notifications

Table 3.5.4:Table description of positions of notification .

Users

Table 3.5.5 :Description of users.


CHAPTER 4

IMPLEMENTATION

4.1 CODE

<?php
require_once('assets/php/header.php');
?>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h4 class="text-center text-primary mt-2">Write Your Complain
ts Here!</h4>
</div>
</div>
<div class="card border-primary">
<h5 class="card-header bg-primary d-flex justify-content-betw
een">
<span class="text-light lead align-self-center">All Complaint
s</span>
<a href="#" class="btn btn-light" data-toggle="modal" data-ta
rget="#addNoteModal">&nbsp;<li class="fas fa-plus-circle fa-lg
"></li>&nbsp;Add new Complaints here!</a>
</h5>
<div class="card-body">
<div class="table-responsive" id="showNote">
<p class="text-center lead mt-5">Please Wait...</p>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="addNoteModal" tabindex="-1" role="
dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">New Com
plaint</h5>
<button type="button" class="close" data-dismiss="moda
l" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="#" method="post" id="add-note-form" clas
s="px-3" enctype="multipart/form-data">
<div class="form-group">
<input type="text" name="title" class="form-control fo
rm-control-lg " placeholder="Title" required>
</div>
<div class="form-group">
<textarea name="note" class="form-control form-control
-lg" placeholder="Complaint description" rows="6" required></
textarea><
/div>
<div class="form-group">
<input type="submit" name="addNote"class="btn btn-succ
ess btn-block btn-lg" id="addNoteBtn" value="Add Complaint"nam
e="addNote">
</div>
</form>
</div>
</div>
</div>
</div>
<!-- End add new modal -->
<!-- Modal Edit-->
<div class="modal fade" id="editNoteModal" tabindex="-1" role
="dialog" aria-labelledby="exampleModalLabel" aria-hidden="tru
e"><
div class="modal-dialog" role="document">
<div class="modal-content" >
<div class="modal-header bg-info">
<h5 class="modal-title" id="exampleModalLabel">Edit Co
mplaint</h5>
<button type="button" class="close text-light" data-di
smiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" >
<form action="#" method="post" id="edit-note-form" cla
ss="px-3">
<input type="hidden" name="id" id="id">
<div class="form-group">
<input type="text" name="title" class="form-control fo
rm-control-lg " id="title" placeholder="Enter Title" required>
</div>
<div class="form-group">
<textarea name="note" class="form-control form-control
-lg" id="note" placeholder="Write Your Note Here.." rows="6"
required></textarea>
</div>
<div class="form-group">
<input type="submit" name="editNote"class="btn btn-inf
o btn-block btn-lg" id="editNoteBtn" value="Edit Note">
</div>
</form>
</div>
</div>
</div>
</div>
<!-- End edit modal -->
<script type="text/javascript" src="https://cdn.datatables.net
/1.10.16/js/jquery.dataTables.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></scr
ipt>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.
1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
displayAllNotes();
//add new note ajax request
$("#addNoteBtn").click(function(e)
{
if($("#add-note-form")[0].checkValidity())
{
e.preventDefault();
$("#addNoteBtn").val("Please Wait");
$.ajax({
url:'assets/php/process.php',
data:$("#add-note-form").serialize()+'&action=add_note
',
method:'post',
success:function(response)
{
$("#addNoteBtn").val("Add complaint");
$("#add-note-form")[0].reset();
$("#addNoteModal").modal("hide");
Swal.fire({
title:'complaint added successfully!',
type:'success'
});
displayAllNotes();
}
})
}
});
//update note of user
$("#editNoteBtn").click(function(e)
{
e.preventDefault();
$.ajax({
url:'assets/php/process.php',
data:$("#edit-note-form").serialize()+'&action=update_note
',
method:'post',
success:function(response)
{
Swal.fire({
title:'Note updated successfully!',
type:'success'
});
$("#edit-note-form")[0].reset();
displayAllNotes();
$("#editNoteModal").modal("hide");
}
});
});
//delete a note of user
$('body').on("click",".deleteBtn",function(e)
{
e.preventDefault();
delete_id=$(this).attr('id');
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, delete it!'
}).then((result) => {
if (result.value) {
$.ajax({
url:'assets/php/process.php',
method:'post',
data:{delete_id:delete_id},
success:function(response)
{
Swal.fire({
title:'Note Deleted successfully!',
type:'failure'
});
displayAllNotes();
}
});
}
})
});
//Display note of an user in details
$("body").on('click','.infoBtn',function(e)
{
e.preventDefault();
info_id=$(this).attr('id');
$.ajax({
url:'assets/php/process.php',
method:'post',
data:{info_id:info_id},
success:function(response)
{
data=JSON.parse(response);//converts json into javascript
object
Swal.fire({
title:'<strong>Complaint :ID('+data.id+')</strong>',
type:'info',
html:'<b>Title :</b>'+data.title+'<br><br><b>Complaint :
</b>'+data.note+'<br><br>'+
'<b>Submitted On :</b>'+data.created_at+'<br><br><b>Upd
ated At :</b>'+data.updated_at+'<br><br><b>Status :</b>'+data.
status+"<br><br><b>Completed Or Not :</b>"+data.currentstatus+
"<br>",
showCloseButton:true,
})
}
})
})
//display all note of an user
function displayAllNotes(){
$.ajax({
url:'assets/php/process.php',
method:'post',
data:{
action:'display_notes'
},
success:function(response)
{
$("#showNote").html(response);
$("table").DataTable({
order:[0,'desc']
})}
});
}
//edit note of an user ajax request
$('body').on("click",".editBtn",function(e)
{
e.preventDefault();
edit_id=$(this).attr('id');
$.ajax({
url:'assets/php/process.php',
method:'post',
data:{edit_id:edit_id},
success:function(response)
{
data=JSON.parse(response);
$("#id").val(data.id);
$("#title").val(data.title);
$("#note").val(data.note);
}
})
});
//check notification
checkNotification();
function checkNotification(){
$.ajax({
url:'assets/php/process.php',
method:'post',
data:{
action:'checkNotification'
},
success:function(response)
{
$("#checkNotification").html(response);
}
});
}
});
</script>
</body>
</html>
CHAPTER 5
SNAPSHOTS

Fig 5.1: Admin Login Page

Admin by providing his username and password can log in into his page.

Fig 5.2 Citizen Panel

Citizen can login to the website by giving the credentials like user-id and password.
Fig 5.3 sign up

The citizen visits the site for the for time. He/she has to give some credentials and sign up.

Fig 5.4 Complaint display interface

Here the user can register a complaint and also the user can view the current status of the complaint.
CONCLUSION
By using this platform the citizen can register the complaint towards municipal corporation and also can view
the current status of the registered complaint through the website within few minutes and by using this
platform people living in the metropolitan cities like New Delhi,Mumbai,Chennai,Bengaluru can save their
valuable time by cultivating this techniques and money.

FUTURE WORK
Our project avoids the manual process of registering the complaints and the problems concern with it.Well I
and my team member have worked hard in order to present an improved application better than the existing
one’s regarding the information about the various activities. Still, we found out that the project can be done in
a better way.
REFERENCES
BOOKS
->Fundamentals of database systems,Ramez Elmasri and S B Navathe, 7th Edition, 2017 , Pearson.
->Database management systems, Ramakrishnan, and Gehrke, 3rd Edition,2014,McGraw Hill.
->Coronel, Morris,and Rob,Database Principles Fundamentals of Design, Implementation and Management,
Cengage Learning 2012.
->Silberschatz Korth and Sudharshan, Database System Concepts, 6th Edition,McGraw Hill,2013.

LIST OF WEBSITES
• https://www.w3schools.com/
• https://www.udemy.com/
• https://www.youtube.com

You might also like