Cleanliness Management System Dbms Mini Project Report
Cleanliness Management System Dbms Mini Project Report
BELAGAVI-590018
A PROJECT REPORT
ON
Ms. ASHWINI C S
Assistant Professor, Dept. of CS&E
CERTIFICATE
………………………… …………………………
Ms. ASHWINI C S Dr. NAGESH H R
Asst. Prof. Dept. of CS&E HOD, Dept. of CS&E
SCEM, Mangaluru SCEM, Mangaluru
1. ………………………….
2. ………………………….
ABSTRACT
A Database Management System (DBMS) refers to the technology for creating and managing databases.
DBMS is a collection of inter-related data and a set of programs and a software tool to organize create,
retrieve, update and manage data in a database. The DBMS software additionally comprises the core
facilities to administer the database. The main aim of DBMS is to supply a way to store up and retrieve
database information that is both convenient and efficient.
This project presents a database management system (DBMS) for cleanliness management. The system
allows users to efficiently track and manage the cleanliness of public spaces, such as parks and streets. The
DBMS is designed to provide an interface for users to report cleanliness issues and track the status of
cleaning efforts. The system also provides an administration panel for authorized personnel to manage and
analyze the collected data, such as identifying trends and hotspots of cleanliness issues. The
implementation of the system has demonstrated improved efficiency and transparency in the cleanliness
management process, resulting in a cleaner and more livable public environment.
ACKNOWLEDGEMENT
It is with great satisfaction and euphoria that we are submitting the Mini Project Report on “Cleanliness
management system”. We have completed it as a part of the V semester DBMS Laboratory with Mini
Project (18CSL58) of Bachelor of Engineering in Computer Science & Engineering of Visvesvaraya
Technological University, Belagavi.
We are profoundly indebted to our guide, Ms. Ashwini C S, Assistant Professor, Department of
Computer Science & Engineering for innumerable acts of timely advice, encouragement and we sincerely
express our gratitude.
We express our sincere gratitude to Dr. Nagesh H R, Head of the Department of Computer Science &
Engineering for his invaluable support and guidance.
We sincerely thankful to our beloved Principal Dr. Rajesha S, Sahyadri College of Engineering &
Management and Dr. D. L. Prabhakara, Director, Sahyadri Educational Institutions, who have always
been a great source of inspiration.
Finally, yet importantly, we express our heartfelt thanks to our family & friends for their wishes and
encouragement throughout the work.
4SF20CS032 4SF20CS146
V Sem, B.E., CSE V Sem, B.E., CSE
SCEM, Mangaluru SCEM, Mangaluru
PAGE INDEX
1 Introduction 1-2
3.1 ER Diagram
3.2 Relational schema(ER to relational schema
3.2.1 Mapping of Regular Entity Types
3.2.2 Mapping of Weak Entity Types
3.2.3 Mapping of Binary 1:1 Relationship Types
3.2.4 Mapping of Binary 1:N Relationship Types
3.2.5 Mapping of Binary M:N Relationship Types
3.2.6 Mapping of Multivalued attributes
3.2.7 Mapping of N-ary Relationship
4 Normalization 13-15
5 Implementation 16-26
5.1 Table Structure
5.2 Functionality
5.2.1 Connecting to Database
5.2.2 Selection
5.2.3 Insertion
5.2.4 Update
5.2.5 Delete
5.2.6 Trigger
6 Result 27-40
CHAPTER 1
INTRODUCTION
DBMS stands for “Database Management System”. In short, a DBMS is a database program. Technically
speaking it is a software system that uses a standard method of cataloging, retrieving and running queries on
data. The DBMS manages incoming data, organizes it, and provides ways for the data to be modified or
extracted by used or other programs.
A DBMS makes it possible for end users to create, read, update and delete data in a database. The DBMS
essentially serves as an interface between the database and end users or application programs, ensuring that
data is consistently organized and remains easily accessible.
DBMS include change management, performance monitoring/tuning and backup and recovery. Many
database management systems are also responsible for automated rollbacks, restarts and recovery as well as
the logging and auditing of activity. The DBMS can offer both logical and physical data independence. That
means it can protect users and applications from needing to know where data is stored or having to be
concerned about changes to the physical structure of data (storage and hardware).
As long as programs use the application programming interface (API) for the database that is provided by
the DBMS, developers won’t have to modify programs just because changes have been made to the database.
With relational DBMSs (RDBMSs), this API is SQL, a standard programming language.
1.2. ORACLE
Oracle Database (commonly referred to as Oracle RDBMS or simply as Oracle) [3] is a multi-model
database management system produced and marketed by Oracle Corporation. It is a database commonly
used for running online transaction processing (OLTP), data warehousing (DW), etc. Larry Ellison and his
two friends and former co-workers, Bob Miner and Ed Oates started a consultancy called Software
Development and Laboratories (SDL) in1977. SDL developed the original version of oracle.
1.3. MYSQL
MYSQL, the most popular Open-Source SQL database management system, is developed, distributed, and
supported by Oracle Corporation. MySQL is a component of the LAMP web application software stack (and
others), which is an acronym for Linux, Apache, MySQL, Perl/PHP/Python. MySQL is used by many
database-driven web applications, including Drupal, Joomla, php BB and WordPress.
1.4. JAVA
Java is a popular programming language. It is owned by Oracle, and more devices run Java. Java works on
different platforms (Windows, Mac, Linux Raspberry Pi, etc.). It is open-source, secure, fast, free and
powerful. As Java is close to C++ and C#. It makes it easy for programmers to switch to Java. Java was
developed in the mid-1990 by James A. Gosling, a former computer scientist with Sun Microsystems.
1.5. NETBEANS
NetBeans is an integrated development (IDE) for java. NetBeans allows applications to be developed from a
set of modular software components called modules. The NetBeans Platform is a framework for simplifying
the development of Java Swing desktop applications.
The NetBeans IDE bundle for Java SE contains what is needed to start developing NetBeans plugins and
NetBeans Platform based applications. The underlying NetBeans platform supports creation of new
applications and further development of existing applications using modular software components. As an
application running on the NetBeans Platform, the NetBeans IDE itself is extensible and can be extended to
support new language.
CHAPTER 2
REQUIREMENT SPECIFICATION
CHAPTER 3
DESIGN
3.1 ER DIAGRAM
An entity–relationship model describes interrelated things of interest in a specific domain of knowledge. The
ER Diagram of our project is shown in the Figure:2.1.1
Attribute Relationship
ER DIAGRAM
For every entity in our relationship diagram, we have created a separate relation. These created
relations contain the respected attributes and respected primary key.
TEAMFORM
EMPLOYEE
COMPLAINTS
VOLUNTEERS
ZONES
ZNAME ZID
The ER Diagram contains no weak entities, this step is ignored in this project.
There are three 1:N relation in schema diagram. There is a foreign key approach and have included the
primary key of one relation as the foreign key in the N-sided relation.
The ER Diagram contains no M:N entity, this step is ignored in the project.
The ER Diagram contains no multivalued attributes, this step is ignored for our project.
Since our ER Diagram contains no relation having N-ary Relationships, this step is ignored for
our project.
CHAPTER 4
NORMALIZATION
TEAMFORM
⚫ The TEAMFORM relation is in 1NF because there are no multivalued attributes in the relation schema.
⚫ It is in 2NF because the relation is in 1NF and all the attributes in the relation schema are fully
functionally dependent on the primary key.
⚫ It is in 3NF because the relation is in 2NF and there are no transitive dependencies.
EMPLOYEE
⚫ The EMPLOYEE relation is in 1NF because there are no multivalued attributes in the relation schema.
⚫ It is in 2NF because the relation is in 1NF and all the attributes in the relation schema are fully
functionally dependent on the primary key.
⚫ It is in 3NF because the relation is in 2NF and there are no transitive dependencies.
Department of Computer Science and Engineering, Mangaluru 13
Cleanliness management system
COMPLAINTS
⚫ The COMPLAINTS relation is in 1NF because there are no multivalued attributes in the relation schema.
⚫ It is in 2NF because the relation is in 1NF and all the attributes in the relation schema are fully
functionally dependent on the primary key.
⚫ It is in 3NF because the relation is in 2NF and there are no transitive dependencies.
VOLUNTEERS
⚫ The VOLUNTEERS relation is in 1NF because there are no multivalued attributes in the relation schema.
⚫ It is in 2NF because the relation is in 1NF and all the attributes in the relation schema are fully
functionally dependent on the primary key.
⚫ It is in 3NF because the relation is in 2NF and there are no transitive dependencies.
ZONES
⚫ The Transaction relation is in 1NF because there are no multivalued attributes in the relation schema.
⚫ It is in 2NF because the relation is in 1NF and all the attributes in the relation schema are fully
functionally dependent on the primary key.
⚫ It is in 3NF because the relation is in 2NF and there are no transitive dependencies.
CHAPTER 5
IMPLEMENTATION
5.2 FUNCTIONALITY
DriverManager.registerDriver(new OracleDriver());
5.2.2 SELECTION
5.2.3 INSERTION
try {
DriverManager.registerDriver(new OracleDriver());
insert.setString(1,name);
insert.executeUpdate();
JOptionPane.showMessageDialog(this,"Record Added");
table_update();
jTextField1.setText("");
jTextField1.requestFocus();
try {
DriverManager.registerDriver(new OracleDriver());
con1=DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/XE", "snehal",
"snehal");
insert = con1.prepareStatement("call insert_record(?,?,?,?,?)");
insert.setString(1,name);
insert.setString(2,vmail);
insert.setString(3,vpho);
insert.setString(4,vloc);
insert.setString(5,task);
insert.executeUpdate();
JOptionPane.showMessageDialog(this,"Record Added");
table_update();
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jComboBox1.setSelectedItem("");
jTextField1.requestFocus();
5.2.4 UPDATE
DefaultTableModel Df=(DefaultTableModel)jTable1.getModel();
int selin=jTable1.getSelectedRow();
try
DriverManager.registerDriver(new OracleDriver());
con1=DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/XE", "snehal",
"snehal");
insert.setString(1,name);
insert.setString(2,vmail);
insert.setString(3,vpho);
insert.setString(4,vloc);
insert.setString(5,task);
insert.setInt(6, fid);
insert.setInt(7, fid1);
insert.setInt(8, fid2);
insert.executeUpdate();
JOptionPane.showMessageDialog(this,"Record Updated");
table_update();
jButton2.setEnabled(true);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField1.requestFocus();
catch(Exception e)
5.2.5 DELETE
DefaultTableModel Df=(DefaultTableModel)jTable1.getModel();
int selin=jTable1.getSelectedRow();
try {
int fid=Integer.parseInt(Df.getValueAt(selin, 0).toString());
int fid1=Integer.parseInt(Df.getValueAt(selin, 1).toString());
int fid2=Integer.parseInt(Df.getValueAt(selin, 2).toString());
int dialogResult=JOptionPane.showConfirmDialog(null,"Do you want to delete the
record?","Warning",JOptionPane.YES_NO_OPTION);
if(dialogResult==JOptionPane.YES_OPTION)
{
DriverManager.registerDriver(new OracleDriver());
con1=DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/XE", "snehal",
"snehal");
insert = con1.prepareStatement("delete from teamform where tid=? and eid=? and vid=?");
insert.setInt(1, fid);
insert.setInt(2, fid1);
insert.setInt(3, fid2);
insert.executeUpdate();
JOptionPane.showMessageDialog(this,"Record Deleted");
table_update();
jButton2.setEnabled(true);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField1.requestFocus();
}
Department of Computer Science and Engineering, Mangaluru 24
Cleanliness management system
5.2.6 TRIGGERS
CHAPTER 6
RESULT
FIGURE 6.1 This is the first page that pops up. The user can click on the explore button to see the further
pages.
FIG 6.2 will give the user an option to choose what kind of user they are.
6.2.1 ABOUT US
6.2.2 CONTACT US
FIG 6.3 When you press the public button you get a range of options. The user may click any on
these depending on what he/she is interested in.
FIG 6.5.1 As we have seen when we click on the roads button, we can view the details of the zone and when
was it last cleaned. Similarly we can view the same details if we click the other buttons on the check page
i.e. sidewalks, bustands, drainage, waterbodies
FIGURE 6.7 In order to access the admin side of the page, he/she must enter the password
FIGURE 6.9 View the zone id of the zones that they offer to clean
FIG 6.11.1 This is a common page if we click on any of the buttons in the view team info. In this
page we can add records of an employee, volunteer or team info. We can add new details, edit the
details if there is any mistake and then even delete the record if the record is no longer relevant.
FIG 6.13 Shows The status of the place cleaned. When we are in the view status page we can choose from five options that ]
are roads,sidewalk,drainage,bus stops and water bodies. When we click on any of them we can access the sone names and
CHAPTER 7
CONCLUSION
It has been a matter of immense pleasure, honour, and challenge to have this opportunity to take up this
project and complete it successfully. In conclusion, the cleanliness management system is a valuable tool for
the showroom owner to effectively manage their inventory and customer information. The use of a GUI
allows for easy navigation and data entry, making it simple for the admin to access and update the database.
Overall, this project is a great solution for streamlining the operations of a cleaning company and improving
the overall efficiency of the business. One of the key advantages of this system is the ability to easily track
inventory and sales. The admin can quickly access information on the zones available, as well as their
respective tasks.
On the other hand the public can also interact with the company by applying for volunteering to clean
places. People can also lodge complaints of the pending cleanliness tasks in the respective zones. This
makes the cleaning activity easier. The people can also view the last cleaned information of the zones. This
project focuses on keeping our city clean and tidy and thereby supports The Clean India campaign.
REFERENCES