Dbms Mini Project
Dbms Mini Project
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
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.
Head of Department
Dr. Nirmala C R Ph.D.,
Prof.& Head, Department of CS&E,
B.I.E.T., Davangere.
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.
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
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.
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.
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
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.
DESIGNS
Fig 3.1 : Entity Relationship Diagram of Muncipal Corporation Complaint Management System
Attribute
Entity
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
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.
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.
Feedback
Users
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"> <li class="fas fa-plus-circle fa-lg
"></li> 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">×</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">×</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
Admin by providing his username and password can log in into his page.
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.
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