0% found this document useful (0 votes)
9 views31 pages

Dbms_Report

The document outlines a mini project on an Employee Management System developed by students at Nutan Maharashtra Institute of Engineering and Technology. It includes sections such as an introduction, scope, requirements, database normalization, relational database design, and source code examples. The project aims to streamline employee data management using Java and MySQL, addressing issues present in manual systems.

Uploaded by

saurabhautade18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
9 views31 pages

Dbms_Report

The document outlines a mini project on an Employee Management System developed by students at Nutan Maharashtra Institute of Engineering and Technology. It includes sections such as an introduction, scope, requirements, database normalization, relational database design, and source code examples. The project aims to streamline employee data management using Java and MySQL, addressing issues present in manual systems.

Uploaded by

saurabhautade18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 31

PCET's

NMVPM's
Nutan Maharashtra Institute of Engineering and Technology Talegaon
Dabhade, Pune

Mini Project

On
EMPLOYEE MANAGEMENT SYSTEM
BY

Project Group Members

Name of Student Roll. No.

1. Shubham Patange TE 39

2. Saurabh Autade TE 04

3. Mayuri Kinge TE 17

4. Prachi Aglawe TE 02

Under the Guidance

of
Prof. Mahesh Chinchole

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION


ENGINEERING

2023-2024
PCET's

NMVPM's
Nutan Maharashtra Institute of Engineering and Technology Talegaon
Dabhade, Pune

CERTIFICATE

This is to certify that, this Mini project

report entitled:" EMPLOYEE

MANAGEMENT SYSTEM”

Is a record of mini project work carried out in this college


BY

Project Group Members

Name of Student ROLL NO

1. Shubham Patange TE 39

2. Saurabh Autade TE 04

3. Mayuri Kinge TE 17

4. Prachi Aglawe TE 02

Prof. Mahesh Chinchole


(Project Co-ordinator)

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION


ENGINEERING

2023-24
ACKNOWLEDGEMENT
It gives us immense pleasure in presenting the report
on " EMPLOYEE MANAGEMENT SYSTEM"

We wish to express our sincere thanks to _______________, Principal, Nutan


Maharashtra Institute of Engineering & Technology, Talegaon Dabhade for
providing us all the necessary facilities.
We would like to place on record our deep sense of gratitude to
________________, HOD,Department of Electronics & Telecommunication
Engineering, for his stimulating guidance and continous encouragement.
We are extremely thankful to ________________ for her insightful comments
and constructive suggestions to improve the quality of project work.
Lastly we are thankful to Teaching and non-teaching faculty of the Department
for their continous co-operation.
TABLE OF CONTENTS

S. No. Topic Page No.


1 Certificate 2
2 Acknowledgement 3
3 Abstract 4
4 Chapter-1: Introduction 4
5 Chapter-2:Scope 4
6 Chapter-3: Requirements 5
7 Chapter-4: Database Normalization 6
8 Chapter-5: Relational Database Design 7
9 Chapter-6: Data modeling Features 8
10 Chapter-7: GUI 12
11 Chapter-8: Source Code 22
12 Chapter-9: Testing 23
13 Chapter-10: Conclusion 24
TITLE OF THE PROJECT

“ EMPLOYEE MANAGEMENT SYSTEM USING JAVA AND MYSQL”


Abstract
Human resource difficulties face all businesses, large and small. Because every
organization has different staff management needs, we create custom employee
management solutions that are tailored to your needs. This is intended to aid strategic
planning and guarantee that your firm has the appropriate degree of human resources to
meet your long-term objectives. This approach will help you to better manage your
resources in the long run.

1. Introduction

Everything has been digitised in our age of ever-increasing technology. The human
workforce hasgrown as a result of the abundance of job options. As a result, a system that
can handle the data of such a vast number of people in a company is required. Because of
its user-friendly design, this project makes the process of keeping records easier. The
"EMPLOYEE MANAGEMENT SYSTEM" was created to address the issues that plagued
the previous manual system. This programme is designed to eliminate, and in some cases,
decrease, the problems that the current system has.

To eliminate data entry mistakes, the software is kept as simple as possible. When inputting
incorrect data, it also displays an error notice. The user doesn’t require any formal expertise
to operate this system. The admin will be able to add new employees to this project.
Employee data may also be seen and printed by the administrator. Admins can also remove
an employee and change their details.

2. Scope
The GUI and the features added to this system are the basic ones. In future, there will be a
better Graphical User Interface and there will be more features added to this system. If
Graphical User Interface is improved then this system will be more user friendly and more
features added will make this system a lot better and HR will be able to perform more
operations. the specific functionalities and features that will be included in the employee
management system, such as employee information management, attendance tracking,
performance evaluation, leave management, payroll, training, and compliance.
3. REQUIREMENTS

JAVA- High-level, Object-Oriented programming language which help programmers to


run their applications efficiently. JAVA is the programming language which comes into
our minds when we talk about android application. By using JAVA as a programming
language, programmer can develop any type of android application easily. JAVA also
provides many libraries which also helps in making efficient android application. Swing
is a Java GUI widget toolkit. It's part of Oracle's Java Foundation Classes (JFC), which
provides an API for creating graphical-user- interfaces for Java programmes.

IntelliJ IDEA:-provides a set of inspections that are built-in static code analysis tools.

SWING- Swing is a Java GUI widget toolkit. It's part of Oracle's Java Foundation Classes
(JFC),which provides an API for creating-graphical-user-interfaces for Java programmes.
Swing was created to give a more advanced collection of graphical user interface
components than the previous Abstract Window Toolkit (AWT). Swing offers a pluggable
look and feel that allows applications to have alook &feel that is unconnected to the
underlying platform, as well as a look & feel that emulates the look & feel of numerous
platforms.

SQL- SQL (Structured Query Language) is a computer language that is used to manage
data in arelational database management system (RDBMS) or for stream processing in a
relational data stream management system (RDSMS). It's especially beneficial for dealing
with structured data,or data that has relationships between entities and variables.
4.DATABASE NORMALIZATION
In the given data, we have various attributes related to a person, including name, date of
birth, salary, address, contact number, email, education, occupation, and some numbers.
To normalize this data, you would typically create multiple tables that relate to each other
through keys (usually primary and foreign keys).

TABLE 1 : EMPLOYEE

1. EmpID (PRIMARY KEY)

2. Name

3. Father’s name

4. Salary

Table 2: EmployeeContact

1. EmpID

2. Address

3. Contact no.

4. Email

Table 3: EmployeeDetails

1. EmpID

2. Designation

3. Education

4. Aadhar no.

By normalizing the data in this way, you reduce data redundancy and improve data integrity. It
also allows for more efficient querying and maintenance of the database.
5. Relational Database Design
1. Define the Entity-Relationship Diagram (ERD):
Employee Entity (Employee2 Table):
Attributes: name, fname, dob, salary, address, phone, email, education, designation, aadhar, and
empID.
Login Entity (Login3 Table):
Attributes: username, password.
Relationships:
There is a relationship between Employee and Login based on the common attribute empID. An
empID in the Employee table corresponds to an empID in the Login table.

2. Create the Database Schema:

create table employee2


(
name varchar(20),
fname varchar(20),
dob varchar(20),
salary varchar(20),
address varchar(100),
phone varchar(20),
email varchar(20),
education varchar(20),
designation varchar(20),
aadhar varchar(20) ,
empID varchar(20)
);

create table login3


(
username varchar(20),
password varchar(20)
);
 RDMS DIAGRAM
6. DATA MODELING FEATURES
7. DATA DICTIONARY

1.Define Data Types:


- `dob` is defined as a `DATE` type for the date of birth.
- `salary` is defined as `DECIMAL(10, 2)` to handle salaries with two decimal places.
- `email` is defined as `VARCHAR(50)` to accommodate longer email addresses..

2. Create Tables :
Create a table using create table table_name syntax

2. Add Sample Data:

You can add sample data to the tables using SQL `INSERT` statements.

3. Create Indexes and Constraints:

Consider creating indexes and constraints (e.g., unique constraints, primary keys) based On
project.

4. Test and Optimize:

Test the database schema, run queries, and optimize as needed for your specific project
requirements.
8.GRAPHICAL USER INTERFACE
1. User Interface

2. Login frame – This is the login frame of this system where user have to enter the required
credentials to have access for the main dashboard.
3.Main Dashboard – After login in, user is directed to the main dashboard of this system
where user can perform various operations like adding an employee, deleting an employee,
update information about employee
4.Add employee – Here user have to enter all the required credentials to add anew
employee to the system.

5.Remove employee – User has to enter the employee id in order to delete hisinformation from
the system.
9. SOURCE CODE
1. Front end:
Splash class :-
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Splash extends JFrame implements ActionListener {

Splash()
{

getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel heading = new JLabel("EMPLOYEE MANAGEMENT SYSTEM");


heading.setBounds(80, 30, 1200, 60);
heading.setFont(new Font("serif", Font.PLAIN, 60));
heading.setForeground(Color.RED);
add(heading);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/front.jpg"));
Image i2 = i1.getImage().getScaledInstance(1100, 700, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(50, 100, 1050, 500);
add(image);

JButton clickhere = new JButton("CLICK HERE TO CONTINUE");


clickhere.setBounds(400, 400, 300, 70);
clickhere.setBackground(Color.BLACK);
clickhere.setForeground(Color.WHITE);
clickhere.addActionListener(this);

image.add(clickhere);

setSize(1170, 650);
setLocation(200, 50);
setVisible(true);

while(true) {
heading.setVisible(false);

heading.setVisible(true);

}
}

public void actionPerformed(ActionEvent ae) {


setVisible(false);
new Login();
}

public static void main(String args[])


{
new Splash();
}
}
Login class:-

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

class Login extends JFrame implements ActionListener {

JTextField tfusername, tfpassword;

Login() {

getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel lblusername = new JLabel("Username");


lblusername.setBounds(40, 20, 100, 30);
add(lblusername);

tfusername = new JTextField();


tfusername.setBounds(150, 20, 150, 30);
add(tfusername);

JLabel lblpassword = new JLabel("Password");


lblpassword.setBounds(40, 70, 100, 30);
add(lblpassword);

tfpassword = new JTextField();


tfpassword.setBounds(150, 70, 150, 30);
add(tfpassword);

JButton login = new JButton("LOGIN");


login.setBounds(150, 140, 150, 30);
login.setBackground(Color.BLACK);
login.setForeground(Color.WHITE);
login.addActionListener(this);
add(login);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/second.jpg"));


Image i2 = i1.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(350, 0, 200, 200);
add(image);

setSize(600, 300);
setLocation(450, 200);
setVisible(true);
}
public void actionPerformed(ActionEvent ae) {
try {
String username = tfusername.getText();
String password = tfpassword.getText();

Conn c = new Conn();


String query = "select * from login3 where username = '"+username+"' and password = '
"+password+"'";

ResultSet rs = c.s.executeQuery(query);
if (rs.next())
{
setVisible(false);
new Home();

} else {
JOptionPane.showMessageDialog(null, "Invalid username or password");
setVisible(false);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}

public static void main(String[] args)


{
new Login();
}
}
Home page class:-

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

class Home extends JFrame implements ActionListener {

JButton view, add, update, remove;

Home() {

setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/home.jpg"));


Image i2 = i1.getImage().getScaledInstance(1120, 630, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0, 0, 1120, 630);
add(image);

JLabel heading = new JLabel("Employee Management System");


heading.setBounds(620, 20, 400, 40);
heading.setFont(new Font("Raleway", Font.BOLD, 25));
image.add(heading);

add = new JButton("Add Employee");


add.setBounds(650, 80, 150, 40);
add.addActionListener(this);
image.add(add);

view = new JButton("View Employees");


view.setBounds(820, 80, 150, 40);
view.addActionListener(this);
image.add(view);

update = new JButton("Update Employee");


update.setBounds(650, 140, 150, 40);
update.addActionListener(this);
image.add(update);

remove = new JButton("Remove Employee");


remove.setBounds(820, 140, 150, 40);
remove.addActionListener(this);
image.add(remove);

setSize(1120, 630);
setLocation(250, 100);
setVisible(true);
}
public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == add) {
setVisible(false);
new AddEmployee();

} else if (ae.getSource() == view) {

} else if (ae.getSource() == update) {

} else {

}
}

public static void main(String[] args) {


new Home();
}
}
Add Employee class :-

import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.*;

public class AddEmployee extends JFrame implements ActionListener{

Random ran = new Random();


int number = ran.nextInt(999999);

JTextField tfname, tffname, tfaddress, tfphone, tfaadhar, tfemail, tfsalary,


tfdesignation,dcdob;
JComboBox cbeducation;
JLabel lblempId;
JButton add, back;

AddEmployee() {
getContentPane().setBackground(Color.WHITE);
setLayout(null);

JLabel heading = new JLabel("Add Employee Detail");


heading.setBounds(320, 30, 500, 50);
heading.setFont(new Font("SAN_SERIF", Font.BOLD, 25));
add(heading);

JLabel labelname = new JLabel("Name");


labelname.setBounds(50, 150, 150, 30);
labelname.setFont(new Font("serif", Font.PLAIN, 20));
add(labelname);

tfname = new JTextField();


tfname.setBounds(200, 150, 150, 30);
add(tfname);

JLabel labelfname = new JLabel("Father's Name");


labelfname.setBounds(400, 150, 150, 30);
labelfname.setFont(new Font("serif", Font.PLAIN, 20));
add(labelfname);

tffname = new JTextField();


tffname.setBounds(600, 150, 150, 30);
add(tffname);

JLabel labeldob = new JLabel("Date of Birth");


labeldob.setBounds(50, 200, 150, 30);
labeldob.setFont(new Font("serif", Font.PLAIN, 20));
add(labeldob);

dcdob = new JTextField();


dcdob.setBounds(200, 200, 150, 30);
add(dcdob);

JLabel labelsalary = new JLabel("Salary");


labelsalary.setBounds(400, 200, 150, 30);
labelsalary.setFont(new Font("serif", Font.PLAIN, 20));
add(labelsalary);

tfsalary = new JTextField();


tfsalary.setBounds(600, 200, 150, 30);
add(tfsalary);
JLabel labeladdress = new JLabel("Address");
labeladdress.setBounds(50, 250, 150, 30);
labeladdress.setFont(new Font("serif", Font.PLAIN, 20));
add(labeladdress);

tfaddress = new JTextField();


tfaddress.setBounds(200, 250, 150, 30);
add(tfaddress);

JLabel labelphone = new JLabel("Phone");


labelphone.setBounds(400, 250, 150, 30);
labelphone.setFont(new Font("serif", Font.PLAIN, 20));
add(labelphone);

tfphone = new JTextField();


tfphone.setBounds(600, 250, 150, 30);
add(tfphone);

JLabel labelemail = new JLabel("Email");


labelemail.setBounds(50, 300, 150, 30);
labelemail.setFont(new Font("serif", Font.PLAIN, 20));
add(labelemail);

tfemail = new JTextField();


tfemail.setBounds(200, 300, 150, 30);
add(tfemail);

JLabel labeleducation = new JLabel("Higest Education");


labeleducation.setBounds(400, 300, 150, 30);
labeleducation.setFont(new Font("serif", Font.PLAIN, 20));
add(labeleducation);

String courses[] = {"BBA", "BCA", "BA", "BSC", "B.COM", "BTech", "MBA", "MCA",
"MA", "MTech", "MSC", "PHD"};
cbeducation = new JComboBox(courses);
cbeducation.setBackground(Color.WHITE);
cbeducation.setBounds(600, 300, 150, 30);
add(cbeducation);

JLabel labeldesignation = new JLabel("Designation");


labeldesignation.setBounds(50, 350, 150, 30);
labeldesignation.setFont(new Font("serif", Font.PLAIN, 20));
add(labeldesignation);

tfdesignation = new JTextField();


tfdesignation.setBounds(200, 350, 150, 30);
add(tfdesignation);

JLabel labelaadhar = new JLabel("Aadhar Number");


labelaadhar.setBounds(400, 350, 150, 30);
labelaadhar.setFont(new Font("serif", Font.PLAIN, 20));
add(labelaadhar);

tfaadhar = new JTextField();


tfaadhar.setBounds(600, 350, 150, 30);
add(tfaadhar);

JLabel labelempId = new JLabel("Employee id");


labelempId.setBounds(50, 400, 150, 30);
labelempId.setFont(new Font("serif", Font.PLAIN, 20));
add(labelempId);
lblempId = new JLabel("" + number);
lblempId.setBounds(200, 400, 150, 30);
lblempId.setFont(new Font("serif", Font.PLAIN, 20));
add(lblempId);

add = new JButton("Add Details");


add.setBounds(250, 550, 150, 40);
add.addActionListener(this);
add.setBackground(Color.BLACK);
add.setForeground(Color.WHITE);
add(add);

back = new JButton("Back");


back.setBounds(450, 550, 150, 40);
back.addActionListener(this);
back.setBackground(Color.BLACK);
back.setForeground(Color.WHITE);
add(back);

setSize(900, 700);
setLocation(300, 50);
setVisible(true);
}

public void actionPerformed(ActionEvent ae) {


if (ae.getSource() == add) {
String name = tfname.getText();
String fname = tffname.getText();
String dob = dcdob.getText();
String salary = tfsalary.getText();
String address = tfaddress.getText();
String phone = tfphone.getText();
String email = tfemail.getText();
String education = (String) cbeducation.getSelectedItem();
String designation = tfdesignation.getText();
String aadhar = tfaadhar.getText();
String empId = lblempId.getText();

try {
Conn conn = new Conn();
String query = "insert into employee2 values('"+name+"', '"+fname+"',
'"+dob+"', "+salary+", '"+address+"', "+phone+", '"+email+"', '"+education+"',
'"+designation+"', '"+aadhar+"', '"+empId+"')";
conn.s.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Details added successfully");
setVisible(false);
new Home();
} catch (Exception e) {
e.printStackTrace();
}
} else {
setVisible(false);
new Home();
}
}

public static void main(String[] args) {


new AddEmployee();
}
}
Connection class:-
import java.sql.*;

class Conn {

Connection c;
Statement s;

public Conn()
{
try
{
Class.forName("com.mysql.cj.jdbc.Driver");

c=DriverManager.getConnection("jdbc:mysql:///employeemanagementsystem","root",
“*******");
s = c.createStatement();
}

catch (Exception e)
{
e.printStackTrace();
}
}
}
2. Backend:-
MYSQL

create database employeemanagementsystem;

use employeemanagementsystem;

create table login3(username varchar(20), password varchar(20));

insert into login3 values('saurabh', 1234);

select * from login3 ;

create table employee2(name varchar(20), fname varchar(20), dob varchar(20),salary


varchar(20), address varchar(100),phone varchar(20),email varchar(20),education
varchar(20),designation varchar(20),aadhar varchar(20) , empID varchar(20) );

select * from employee2;


10.Testing

Test ID Test- Test-Condition Expected-Output Output Remark


Purpose
TC1 Check If user details are not Grant access to main Access Test
Username correct, display error dashboard. granted to successful
& Password message main
dashboard
TC2 To add new If user already exists, New user should be New user Test
user to the error message should be added. added Successful
system displayed. successfully

TC3 To view If employee exists, then Employee information Employee Test


existing information should be should be displayed. information Successful
employee displayed, else error displayed.
information message should be
displayed.
TC4 To remove If employee exists, then Employee should be Employee Test
an employee should be removed. removed Successful
employee removed else error successfully.
message should be
displayed.
11.Conclusion

 The goal of the initiative is to digitise personnel databases in businesses and provide
administrators access to computers. Employees and administrators use software as an
information system.
 The user can store his or her database safe and secure for an indefinite amount of time here.
Adding, deleting, accessing, and changing employee information is simple and easy using the
Employee Management System.

You might also like