[Unit 12, SQL - Employee Management System Assignment]
This is a command-line application that manages a company's employee database using Node.js, Inquirer, and MySQL.
It follows a content management systems (CMS) interface that allows non-developers to easily view and interact with information stored in the database.
The application has the following appearance:
A walkthrough video that demonstrates the features and functionalities of this employee tracker can be viewed by clicking the following links:
The application files can be accessed on my Github repository.
- Title
- Description
- Installation
- Usage
- Technologies
- License
- Contributing
- Tests
- Credits
- Author
- Questions
-
Clone my repository on GitHub.
-
On Visual Studio Code:
- Open the cloned file.
- Create your
gitignore
and.env
files. - Check the
dependencies
anddev dependencies
needed onpackage.json
.
-
To set up all the existing npm packages, run
npm init
. -
To install the
dependencies
on thenode_modules
folder, runnpm install
ornpm i mysql2
to install MySQL2,npm i inquirer
to install Inquirer,npm i node
to install Node.js, andnpm i console.table
to install console.table.
-
Run MySQL by entering the following:
mysql -u root -p
-
Create the
schema.sql
tables and pre-populate the database with the data found in theseeds.sql
files. -
To invoke the application, run
npm start
Please see the walk-through demonstration videos, descripton, and features and functionalities sections.
- When the user starts the application, the user is presented with the following options:
- view all departments,
- view all roles,
- view all employees,
- add a department,
- add a role,
- add an employee,
- update an employee role,
- update an employee's manager,
- delete a department,
- delete a role,
- delete an employee,
- view employees by manager,
- view employees by role,
- view employees by department, and
- view a department budget.
- By clicking the correct prompt, a user can view all departments, all roles, or all employees.
View All Departments
- When the user chooses to view all departments, the user is presented with a formatted table showing department names and department ids.
View All Roles
- When the user chooses to view all roles, the user is presented with the job title, role id, the department the role belongs to, and the salary for the role.
View All Employees
- When the user chooses to view all employees, the user is presented with a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers the the employees report to.
- A user can add a department, a role, or an employee.
Add a Department
- When the user chooses to add a department, the user is prompted to enter the name of the department and the department is added to the database.
Add a Role
- When the user chooses to add a role, the user is prompted to enter the name, salary, and department for the role and the role is added to the database.
Add an Employee
- When the user chooses to add an employee, the user is prompted to enter the employeeโs first name, last name, role, and manager, and the employee is added to the database.
- A user can update an employee role or manager.
Update a Role
- When the user chooses to update an employee role, the user is prompted to select an employee to update and their new role, and this information is updated in the database.
Update a Manager
- When the user chooses to update an employee's manager, the user is prompted to select an employee to update and their new manager, and this information is updated in the database.
- A user can delete a department, a role, or an employee.
Delete a Department
- When a user chooses to delete a department, the user is prompted to select the department and this information is updated in the database.
Delete a Role
- When the user chooses to delete a role, the user is prompted to select the role and this information is updated in the database.
Delete an Employee
- When the user chooses to delete an employee, the user is prompted to select the employee and this information is updated in the database.
- A user can view employees by manager, by role, or by department.
(Note: Only rank-and-file employees are shown in the employee list when the employees are viewed by manager or by role.)
View by Manager
- When the user chooses to view employees by manager, the user is presented with a formatted table showing the (rank and file) employees who report to the said manager, and their data which include their employee ID, first names, and last names.
View by Role
- When the user chooses to view employees by role, the user is presented with a formatted table showing the (rank and file) employees who perform the said role, and their data which include their employee ID, first names, and last names.
View by Department
- When the user chooses to view employees by department, the user is presented with a formatted table showing all employees in the said department (i.e., managerial and rank and file) and their employee data which include their employee ID, first names, last names, title, and salary.
- A user can view the budget of a department.
View a Department budget
- When the user chooses to view the budget of a department, the user is prompted to select the department and is presented with the total utilized budget of a department, which is the combined salaries of all employees in that department.
- Javascript
- MySQL
- Node.js
- Inquirer
License used for this project - MIT
For more information on the above license and other license types, please see the following websites:
To contribute to this application, please email the author for guidelines.
The application and its functionalities are tested manually using Visual Studio Code.
The following were consulted and used in the development of this application:
- UCI Boot Camp study materials, videos, and internet resources on MySQL, Node.js, and Inquirer.
- Jeff Howell and Mike Scharf for the homework walk-through videos (Thanks for putting them together and sharing them in the meeting room. They are a big help!).
- The grader for my Social Media API assignment, whose comments encouraged me to plow through with my employee tracker app -- an assignment I considered to be one of the hardest and most tedious to do -- and not give up and submit an unfinished work. The grader also taught me the standard that I should keep when writing my README files. Thank you!
- mySQL
- Node.js
- npmjs packages and documentations on MySQL2, Node.js, Inquirer, and Express.js.
- Screencastify
Jane Tiglao
For questions or issues, please contact:
- Jane Tiglao
- Email: [email protected]
- GitHub Username: jbtiglao
- GitHub Profile: https://github.com/jbtiglao