Coder Social home page Coder Social logo

my-employee-sql's Introduction

Hey there πŸ‘‹ my name is Liz

  • 🌱 I currently develop React applications and help maintain Wordpress sites
  • 🌎 Lets connect on LinkedIn

my-employee-sql's People

Contributors

dieterichelizabeth avatar

Watchers

 avatar

my-employee-sql's Issues

Create Schema with 3 tables

department
id: INT PRIMARY KEY
name: VARCHAR(30) to hold department name

role
id: INT PRIMARY KEY
title: VARCHAR(30) to hold role title
salary: DECIMAL to hold role salary
department_id: INT to hold reference to department role belongs to (FOREIGN KEY)

employee
id: INT PRIMARY KEY
first_name: VARCHAR(30) to hold employee first name
last_name: VARCHAR(30) to hold employee last name
role_id: INT to hold reference to employee role (FOREIGN KEY)
manager_id: INT to hold reference to another employee that is the manager of the current employee (null if the employee has no manager) (FOREIGN KEY)

Bonus

Update employee managers.

View employees by manager.

View employees by department.

Delete departments, roles, and employees.

View the total utilized budget of a departmentβ€”in other words, the combined salaries of all employees in that department.

Require Inquirer and display prompts

Required prompts

view all departments
presents a formatted table showing department names and department ids

view all roles
presents the job title, role id, the department that role belongs to, and the salary for that role

view all employees
presents a formatted table showing employee data, including employee ids, first names, last names, job titles, departments, salaries, and managers that the employees report to

add a department
prompts user to enter the name of the department and that department is added to the database

add a role
prompts user to enter the name, salary, and department for the role and that role is added to the database

add an employee
prompts user to enter the employee’s first name, last name, role, and manager, and that employee is added to the database

and update an employee role
prompts user to select an employee to update and their new role and this information is updated in the database

Modularize the sql commands

Use a constructor function or class to create a separate file that contains functions for performing specific SQL queries.

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.