As a new data engineer at Pewlett Hackard, my first major task is to research project on employees of the corporation from the 1980s and 1990s. All that remain of the database of employees from that period are six CSV files.
In this assignment, I designed the tables to hold data in the CSVs, imported the CSVs into a SQL database, and answered the questions about the data. In other words, I performed:
-
Data Modeling
-
Data Engineering
-
Data Analysis
Inspected the CSVs and sketched out an ERD of the tables. After designing, the following is the ERD of the database ERD
-
Used the information I had to create a table schema for each of the six CSV files. Specified data types, primary keys, foreign keys, and other constraints.
-
Imported each CSV file into the corresponding SQL table.
Once I had a complete database, the following was done:
-
Listed the following details of each employee: employee number, last name, first name, gender, and salary.
-
Listed employees who were hired in 1986.
-
Listed the manager of each department with the following information: department number, department name, the manager's employee number, last name, first name, and start and end employment dates.
-
Listed the department of each employee with the following information: employee number, last name, first name, and department name.
-
Listed all employees whose first name is "Hercules" and last names begin with "B."
-
Listed all employees in the Sales department, including their employee number, last name, first name, and department name.
-
Listed all employees in the Sales and Development departments, including their employee number, last name, first name, and department name.
-
In descending order, listed the frequency count of employee last names, i.e., how many employees share each last name.
I decided to take the following steps to generate a visualization of the data:
-
Imported the SQL database into Pandas.
-
Created a histogram to visualize the most common salary ranges for employees.
-
Created a bar chart of average salary by title.