Git Product home page Git Product logo

employees-database's Introduction

Employee Data Management System

This Employee Data Management System is a group project by the 'The Great Wall of Code' consisting of Selam, Alastair, Mamoon, Alex, Howard, Daniell and Irina. ๐Ÿ‘‹

Overview

This project involves parsing corrupted employee data from a CSV file, cleaning it, and storing it in a MySQL database. The program also provides a Data Access Object (DAO) class for performing CRUD operations on the employee data.

Requirements

  • Java
  • MySQL database
  • IntelliJ

Dependencies

  • Junit
  • Hamcrest-core
  • JDBC
  • MySQL

More about the project

Our application allows the user to query the data in the following ways:

  • ๐Ÿ†” Get all valid employees: get a list of all employee data that is stored in the database.
  • Get Employee by ID: get a single Employee record by searching for that Employee's ID.
  • Insert employees: add a list of employees to the database.
  • Delete employee records by ID: delete a single employee record by providing that Employee's ID.
  • Edit Employee first name: edit a single Employee record by searching by ID and inputting a new first name.
  • Load and validate employee data from a file: Load employee data from a file of potentially corrupted employee data.
  • ๐Ÿงฎ Count number of Employees: count the total number of Employee records in the database.

We aim to enhance the functionality of our queries by optimising our methods to retrieve data from our public records, ensuring quicker data retrieval.

Setup

Ensure you have both Java and MySQL installed on your system. On the top-level directory of the repository, you will find a file named schemaBuildScript.sql. This contains a list of SQL Queries that you should run to set up or reset your local database.

Steps

  1. Fork this repository: Click on the "Fork" button at the top right corner of the repository page to create a copy of the project in your GitHub account.

  2. Clone the forked repository: Clone the forked repository to your local machine using the following command:

  1. Replace <repository_url> with the URL of your forked repository.

  2. Import into your preferred Java IDE: Open your preferred Java Integrated Development Environment (IDE) and import the cloned project.

  3. Add your contributions: Make your desired contributions to the project, whether it's code improvements, bug fixes, or documentation updates.

  4. Commit and push: Once you've made your changes, commit them to your local repository and push them to your forked repository on GitHub using the following commands:

  • git add .
  • git commit -m "Your commit message"
  • git push origin main
  1. Wait for pull request to be merged: After pushing your changes to your forked repository, create a pull request (PR) from your fork to the original repository. Wait for the project maintainers to review and merge your changes into the main project.

By following these steps, you can effectively contribute to and collaborate on the project.

How to Use the Project

  • Any of the DAO methods can be called within the App class, and these have been commented out. Please feel free to uncomment these lines to experiement with the various methods that have been implemented.
  • The initial command that must be run is ui.openDBConnection(); This ensures that the connection to the database is correctly established.
  • The second command that must be run is ui.loadValidatedEmployeeData(); This ensures that the validated employee data is properly added to the database, ready to be manipulated.
  • The final command that must be run is ui.closeDBConnection(); This ensures that the connection to the database is correctly closed.
  • In the future, a more established user interface can be developed to cater to the client's requirements.

๐Ÿ“ซ If you come across any bugs, please don't hesitate to open an issue to inform us. Additionally, we appreciate any suggestions for updates or improvements you may have!

employees-database's People

Contributors

howardc04 avatar baselessfabric avatar selamkd avatar alastair-f-smith avatar daniell-sparta-bow avatar moonraghib97 avatar irinagall avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

employees-database's Issues

As a user, I would like to be able to validate Employee Date of Joining is in the YYYY-MM-DD calendar date format so that I can ensure no corrupted employee Date of Joinings are inserted into the database

  • Given that a date is in any other format other than the YYYY-MM-DD format
    When it is validated
    It should be removed
- Given that a date is in the YYYY-MM-DD format
When it is validated
It should not be removed

- Given that a dates month is greater than 12 or less than 0
When it is validated
Then it should be removed

- Given that a dates day is valid for the month it is in (i.e not greater than 28/29 for February)
When it is validated
Then it should not be removed

- Given that a dates day is not valid for the month it is in (i.e not greater than 28/29 for February)
When it is validated
Then it should be removed

Store date as a SQL date data type in database
Store date as string in database

As a user, I would like to be able to validate Employee Email so that I can ensure no corrupted Employee Email data is entered into the database

  • Given an email is in the standard email format ([email protected])
    When it is validated
    It should not be removed

  • Given an email is not in the standard email format
    When it is validated
    It should be removed

  • Given that email does not have the '@'
    When it is validated
    It should be removed

  • Given that email has nothing before the '@'
    When it is validated
    It should be removed

  • Given that email has nothing after the '@'
    When it is validated
    It should be removed

  • Given that email has no domain
    When it is validated
    It should be removed

  • Given that email has the '@' appear after the domain
    When it is validated
    It should be removed

As a user, I would like to be able to validate employee middle initials so that I can ensure no corrupted middle initial data is entered into the database

  • Given that Middle initial is exactly one character long and a capital
    When it is validated
    It should not be removed

  • Given that Middle initial is longer than one character long
    When it is validated
    It should be removed

  • Given that Middle initial is not a capital letter
    When it is validated
    It should be removed

  • Given that Middle initial is not Alphabetic character (Any character other than the characters in the alphabet)
    When it is validated
    It should be removed

As a user, I would like to be able to validate Employee Date of Birth is in the YYYY-MM-DD calendar date format so that I can ensure no corrupted employee Date of Births are inserted into the database

  • Given that a date is in any other format other than the YYYY-MM-DD format
    When it is validated
    It should be removed

  • Given that a date is in the YYYY-MM-DD format
    When it is validated
    It should not be removed

  • Given that a dates month is greater than 12 or less than 0
    When it is validated
    Then it should be removed

  • Given that a dates day is valid for the month it is in (i.e not greater than 28/29 for February)
    When it is validated
    Then it should not be removed

  • Given that a dates day is not valid for the month it is in (i.e not greater than 28/29 for February)
    When it is validated
    Then it should be removed

Store date as a SQL date data type in database

As a user, I would like to be able to validate Employee IDs so that I can ensure no corrupted ID data is entered into the database

  • Given that an ID is more than 6 characters long
    When it is validated
    Then it should be removed

  • Given that an ID is less than 6 characters long
    When it is validated
    Then it should be removed

  • Given that an ID is exactly 6 characters long and is only numbers
    When it is validated
    Then it should not be removed

  • Given that an ID contains anything other than numbers
    When it is validated
    Then it should be removed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.