From the course: PostgreSQL Essential Training

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Challenge: Execute a command on the Postgres server

Challenge: Execute a command on the Postgres server - PostgreSQL Tutorial

From the course: PostgreSQL Essential Training

Challenge: Execute a command on the Postgres server

(bright music) - [Narrator] It's time for another challenge. This time, I'd like you to add some tables to the human_resources schema in the Kinetico database. Create one table for employees and a second table for the departments where they work. The employee table will have columns for the employee_id, first_name, last_name, hire_date, and department_id. The departments table will need columns for the department_id, department_name, and building. Make sure to choose appropriate data types for each column. Finally, create a foreign key relationship between the two tables on the department_id column so that we can relate the employees to the departments where they work. This challenge should take less than 10 minutes to complete. In the next movie, I'll demonstrate how I would add these tables to the Kinetico database. Good luck.

Contents