Skip to content

Practice designing tables and their relationships, creating those tables, loading information to the tables, and querying specific information from them.

Notifications You must be signed in to change notification settings

dkogel/Employee-database-using-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Employe database using SQL

In this project, I created an ERD (entity relationship diagram) using https://www.quickdatabasediagrams.com/. Once the ERD was complete, I used it to generate the queries to create tables in a PostgreSQL database to load a series of CSV files with sample emloyee data. Finally, once that data had been loaded, I queried the database for various sets of information about the employees in the sample data.

ERD

Follow these stops to recreate this database and run the queries in Employees_DB_queries.sql

  1. Clone the repository to your machine.

  2. Open PGadmin and create a database named employees_DB.
    Note: This project was created using PGadmin version 5.7.

  3. Open the query editor and then open Employees_DB_queries.sql in the editor.

  4. Highlight and run all queries contained in the file to create the tables and add key contstraints.

  5. Import each csv from the data folder into the table of the same name.
    Make sure to import the files in the same order that the tables were created, and select the option to indicate that the files do have headers in the import window

  6. Open a new query editor and then open the Employees_DB_queries.sql file.

  7. Highlight and run each query in the Employees_DB_queries.sql file to see the employee information generated by each query.


Daniel Kogel
dkogel123@gmail.com
www.linkedin.com/in/daniel-kogel

About

Practice designing tables and their relationships, creating those tables, loading information to the tables, and querying specific information from them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published