Employee Data Base Management Project using Data Structures with Java

We are doing a project which is about storing the data (details) of employees of a company or any other industry.

In this project, we are providing many functions to store and manipulate the data of employees such as

  • Storing the details like name of the employee,  ID, salary, date of joining, etc.
  • Adding new employee details to the existing list.
  • Providing the report of required employees.
  • To provide details of a specific employee.
  • To give the sorted list of employees based on name, ID, salary, and date of joining.
  • This project also gives the report of employees with certain specifications.

For this project, we are using a data structure-linked list to store the details of employees, and also we can add details of a new employee to the existing list. We are implementing the method to search for an employee and give details provided his name or ID. In this project, we also have a method to sort the list of employees based on name, ID, salary, and date of joining using different data structures. This project allows users to get the details of a certain number of employees from the list. We can also use this project to get the list of employees with certain specifications like the number of employees whose salary is in the given range.

INTRODUCTION

Our project “Employee Data Base Management”  is an application that we have created that helps to manage the details of employees associated with the company.  Since in a company, there are many employees who have worked or are working, to manage all their details such as their name, ID, date of joining and salary, etc., so to manage these data by conventional methods is cumbersome so we have developed this small application which is very helpful nowadays. This application will reduce the workload in generating the report, maintaining the data, and updating it as per the user’s requirement.

In our project, we have provided two user modes. First is the administrator and guest mode.

In our project, the administrator mode gives the user the ability to

  • Add a new employee’s details.
  • Update the details of an existing employee.
  • Delete (fired from the company) the details of a specific employee from the database.
  • Search for the details of an employee based on name or his/her ID in both working and nonworking categories.
  • Display the list of all employees either in the working or nonworking category.

In our project, the guest mode gives the user the  to 

  • Search for the details of an employee based on name or his/her ID in both working and nonworking categories.
  • Generate a report as the guest user desires for example generating the report in a sorted manner based on name, and ID.

OBJECTIVE

The main objective behind the development of this project is to create software with the following features:

  1. Highly user-friendly
  2. Enterprise independent
  3. Cross-platform
  4. Easy-to-use
  5. Tested system to track unnoticed error
  6. Data entry is restricted to valid domains to avoid errors

We are using the node ENode to form a doubly linked list and in each node, we are storing the details of one employee.

In each node, we are having different fields as follows

  • Left- Address of the previous node
  • Name-Name of the employee
  • ID-Employee’s ID
  • Position-Employee’s position in the company/firm
  • Gender-Gender of the employee
  • Salary-Employee’s annual income
  • Date of join-Date on which employee joined the company
  • Right-Address of the next node

Flow Chart:

IMPLEMENTATION

Class ENode

In this class, we have fields to store the details of employees. In each node, we are having different fields as follows

  • Left- Address of the previous node
  • Name-Name of the employee
  • ID-Employee’s ID
  • Position-Employee’s position in the company/firm
  • Gender-Gender of the employee
  • Salary-Employee’s annual income
  • Date of join-Date on which employee joined the company
  • Right-Address of the next node

Class EList

In this class, we have implemented the following methods

  • addEmp : this method does the job of adding the ENode node of employee details to the list-elist. And also this method is used to add ENode read from the file(“employee.dat”) again to the elist.
  • delEmp : this method does the job of deleting the node ENode from the working employees list elist and calls the method naddEmp and passes the deleted node as a parameter.
  • naddEmp : this method does the job of adding the ENode node of employee details which is deleted from elist to the list-nlist. And also this method is used to add ENode read from a file (“nemployee.dat”) again the nlist.
  • update : this method allows to edit and resave the details of an employee asked by the user.
  • fread : this method reads the data from both files “employee.dat” and “nemployee.dat” which creates a node and calls addEmp method to form the doubly linked list.
  • display : this method displays the list of employees in a display window

Class ESearch

      In this class we have implemented the following method

  • nsearch : this method searches for the entered name and displays the details of that employee. If the name is not found in the list then an error message “The name you entered not found” is printed.
  • idsearch: this method searches for the entered ID and displays the details of that employee. If the ID is not found in the list then an error message “The ID you entered not found” is printed.
  • Salsearch : this method gives the list of employees who all have salaries in the given range. If no employees in the database are having salary within the entered range then an error message “The salary range you entered not found” is printed
  • dojsearch : this method gives the list of employees who joined the company in the specified range of date. If no employees in the database have joined within the entered range then an error message ”No employees joined during this time” is printed.

Class ESort :

      In this class, we have implemented the following methods

  • nsort : this method gives a sorted list of employees based on their names. If there the list is empty then the message “NO DATA EXISTS” is printed.
  • idsort : this method gives the sorted list of employees based on ID. If there the list is empty then the message “NO DATA EXISTS” is printed.

Class EFile :

     In this class, we have implemented the following methods

  • fwrite1 : this method writes the data of list-elist the list into the file “employee.dat” whenever the list is edited. We are using @ as delimiter.
  • Fwrite2 : this method writes the data of list-nlist the list into the file “nmployee.dat” whenever the list is edited. We are using @ as a delimiter.

CONCLUSION

This was our project based on an Employee database management System. We think this system will give a better way for a shopkeeper to maintain his shop. Though every task is never said to be perfect in this development field even more improvements are possible in this system which we have mentioned below and some more improvements can also be done to give a more user-friendly system that can help the shopkeeper more efficiently. This project has contributed a lot to my knowledge that has proved to be a valuable addition for me.

SCOPE FOR IMPROVEMENT

  • All frame objects are created as static hence when we move to the next frame and return back to the previous frame the content of the frame will be stored. Therefore we are using the reset button everywhere.
  • In our project in some of the frames, we have a button PRINT to get the printout of the report generated but we have not given any action to that button.

Download the complete project on Employee Data Base Management.

Leave a Reply

Your email address will not be published. Required fields are marked *