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 - 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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Organize tables with schemas6m 35s
-
(Locked)
Create a table with pgAdmin6m 57s
-
(Locked)
Link primary and foreign keys6m 38s
-
(Locked)
Enforce referential integrity on related records6m 24s
-
(Locked)
Challenge: Execute a command on the Postgres server55s
-
(Locked)
Solution: Execute a command on the Postgres server5m 19s
-
(Locked)
-
-
-
-