Skip to content

Application for managing a company's employee roster. Executes in Terminal via CLI. Interaction built with node, express, inquirer. Employs a MySQL relational database to hold employee information and Console.Table for table presentation.

License

Notifications You must be signed in to change notification settings

palowenstein/mysql-employee-management-tracker-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#12-mysql-employee-management-tracker-application

Project license

Employee management application executed via a Node Command Line Interface (CLI). Employee information is stored in a MySQL database.

Github Repository Page: https://github.com/palowenstein/mysql-employee-management-tracker-application

Github Deployment Page: N/A - App is to be executed via CLI in Terminal (Mac) or Powershell, Bash (PC).

Table of Contents

GIF

MySQL Employee Management Tracker Application — Dabatase, Seed.sql Setup Demo (GIF)

Gif 1. MySQL Workench: 1. Setting up the database, 2. Populating the database with seed.sql. (GIF)


MySQL Employee Management Tracker Application — CLI App Execution (GIF)

Gif 2. Executing the Application via CLI (Command Line Interface) in Terminal.

Overview

  • The MySQL Employee Management Tracker Application allows for the creation and maintenance of an employee database, ideal for company management.
  • The application is powered by Node.js to allow for JS execution outside of the browser (Mac Terminal window), Express (Get/Post Requests between REST 'REpresentational State Transfer' APIs), Inquirer (for information collection), Console.table (for a clean table display) and a MySQL database which stores the information created, read, updated or deleted (CRUD).
  • The MySQL database, stored in the db folder as schema.sql, can be initiatied via Terminal or, more simply, via MySQL Workbench (GIF/MP4).
  • In addition of the database schema, the db folder also contains a seed.sql file which will populate the database at startup so that it doesn't show empty.
  • Like the database, the seed.sql file can be executed via Terminal or via MySQL Workbench, it contains the names of 19 Atari Inc. key employees (1972-1984) such as Jay Miner or Joe Decuir.
  • The end user, via the Terminal Command-Line Interface, is allowed all four CRUD stages:
    • (Create) Add departments, roles, employees.
    • (Read) View departments, roles, employees.
    • (Update) Update employee roles.
    • (Delete) Delete employees.

Details

  • A .gitignore file is present at the root level to prevent the upload of node_modules, bonus functions in development, .DS_Store.
  • For this application to execute properly:
    1. Oracle's MySQL must be installed and running in the background as seen in the System Preferences photo below. The application will not run correctly otherwise. Please make note of the password associated with your MySQL install as it will be required by the application. Newcomers to MySQL will gain information from reading the following article: https://www.thoughtco.com/installing-mysql-on-mac-2693866
    2. The end user must execute the package.json file via the npm install command (Terminal). This will install the required dependencies (Express, Inquirer, MySQL, Console.Table) needed for the program to run. This package is located in the application root folder and must be executed in situ prior to running the application (see Instructions).

MySQL Employee Management Tracker Application — MySQL Background Execution / Mac OSX System Preferences (PNG)

Fig. 0. MySQL runs in the background as seen in the MySQL maintenance panel located in System Preferences (Apple Macintosh).

Instructions

  • Makes sure MySQL is properly installed, password initiated and running in the background as seen in the Details section illustration above.
  • In MySQL Workbench, load the schema.sql file, located in the application db folder, then initiate it by clicking on the lightning bolt (GIF/MP4).
  • Still in MySQL Workbench, locate the seed.sql file in the application db folder then, as in the prior step, initiate it by clicking on the lightning bolt (GIF/MP4).
  • In the Application folder, open app.js in a text / code editor, add your MySQL Password on line 17 between the password quotation marks.
  • In Terminal, locate the application folder and enter into it via the 'cd' command: cd mysql-employee-management-tracker-application
  • Run the 'npm install' command to install the necessary node modules from the package.json.
  • Run the 'node app.js' command to launch the application in Terminal (GIF/MP4).
  • Once the application is running, you can exert all four CRUD privileges (Create Read Update Delete):
    1. Creation: Create departments, roles, employees.
    2. Reading: Read departments, roles, employees.
    3. Updating: Update employee roles.
    4. Deletion: Delete employees.
  • The application can be closed from the main menu by selecting the 'Leave' option.

Refer to app.js (javascript file) for code dissection.

Screenshots

MySQL Employee Management Tracker Application — Setting up the database in MySQL Workbench (PNG)

Fig. 1. Setting up the database in MySQL Workbench (PNG)


MySQL Employee Management Tracker Application — Populating the database with seed.sql (ATARI Employees) in MySQL Workbench (PNG)

Fig. 2. Populating the database with seed.sql (ATARI Employees) in MySQL Workbench (PNG)


MySQL Employee Management Tracker Application — Executing the Application via CLI Interface in Terminal [1] (PNG)

Fig. 3. Executing the Application via CLI Interface in Terminal [1] (PNG)


MySQL Employee Management Tracker Application — Executing the Application via CLI Interface in Terminal [2] (PNG)

Fig. 4. Executing the Application via CLI Interface in Terminal [2] (PNG)

Video

MySQL Employee Management Tracker Application — Dabatase, Seed.sql Setup Demo (MP4)

MySQL Employee Management Tracker Application — Executing the Application via CLI Interface in Terminal (MP4)

References

  • MySQL Relational Database Structure.
  • Node.js Javascript Library for CLI Execution.
  • Express for GET/POST/DELETE Requests between REST APIs.
  • Inquirer for prompt interaction, data collection.
  • Console.Table for proper CLI table formatting / presentation.
  • Package.JSON / NPM for installing dependencies

License

MIT License | Copyright © [2021] Pierre André Lowenstein

Contributions

  • Pull/Fork from master.
  • Create your own branch.
  • Add your own code (must be tested).
  • Push your branch.
  • Request a pull.

Please use the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md)

For major changes, please open an issue beforehand to discuss the changes.

Contact

[www] pierreandrelowenstein.com  |  [e-mail] Send me a 'courriel'

About

Application for managing a company's employee roster. Executes in Terminal via CLI. Interaction built with node, express, inquirer. Employs a MySQL relational database to hold employee information and Console.Table for table presentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published