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.
-
Clone the repository to your machine.
-
Open PGadmin and create a database named
employees_DB.
Note: This project was created using PGadmin version 5.7. -
Open the query editor and then open
Employees_DB_queries.sqlin the editor. -
Highlight and run all queries contained in the file to create the tables and add key contstraints.
-
Import each csv from the
datafolder 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 -
Open a new query editor and then open the
Employees_DB_queries.sqlfile. -
Highlight and run each query in the
Employees_DB_queries.sqlfile to see the employee information generated by each query.
Daniel Kogel
dkogel123@gmail.com
www.linkedin.com/in/daniel-kogel
