Skip to content

Created a diagram of schema tables for a fictional company’s employees, managers, titles, departments, and salaries, which included both primary and foreign key constraints. Once completed, the schema was imported into PostgreSQL to run various queries by selecting table keys and joining data sets on the appropriate column.

Notifications You must be signed in to change notification settings

CMDenys/SQL-engineering-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this research project data modeling, engineering, and analyis were peformed on employees of a corporation from the 1980s and 1990s. All that remain of the database of employees from that period were six CSV files.



Data Modeling

The first step was to inspect the CSV's, design tables, and sketch them out in an ERD. To facilitate this first step, Quick-DBD was used.




Data Engineering

Next, the information used to create the ERD was used to build a table schema for each of the six CSV files. In this step, data types, primary keys, foreign keys, and other constraints were identified.



Data Analysis

Finally, the CSV's were imported into a SQL database (PostgreSQL) where schema queries were run to answer questions about the data.



Below are the individual schema queries that were run once the individual data sets were combined.



List of details for each employee:

  • Employee Number
  • Last Name
  • First Name
  • Sex
  • Salary




Employees hired in 1986:

  • First Name
  • Last Name
  • Hire Date




The manager of each department with the following details:

  • Department Number
  • Department Name
  • Manager's Employee Number
  • Last Name
  • First Name




The department of each employee with the following details:

  • Employee Number
  • Last Name
  • First Name
  • Department Name




Details for employees whose first name is "Hercules" and last names begin with "B":

  • First Name
  • Last Name
  • Sex




List of all employees in the Sales department, including the following details:

  • Employee Number
  • Last Name
  • First Name
  • Department Name




List of all employees in the Sales and Development departments, including the following details:

  • Employee Number
  • Last Name
  • First Name
  • Department Name




In descending order, a list of the frequency count of employee last names, i.e., how many employees share each last name




About

Created a diagram of schema tables for a fictional company’s employees, managers, titles, departments, and salaries, which included both primary and foreign key constraints. Once completed, the schema was imported into PostgreSQL to run various queries by selecting table keys and joining data sets on the appropriate column.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published