A volunteer can sign up for several shifts, and a shift can have several volunteers. The pair identifies the signup.
This exercise starts without tables. The following dictionaries describe the tables to create, not preloaded tables.
signupsOne row represents one volunteer-shift signup.
| Field / SQL type | Meaning | Rules |
|---|---|---|
volunteer_id · integer | Volunteer identifier forming one half of the signup. | Part of the composite primary key. Required; cannot be NULL. |
shift_id · integer | Shift identifier forming the other half of the signup. | Part of the composite primary key. Required; cannot be NULL. |
The pair is the primary key; either identifier can recur in another pair. No parent tables or foreign keys are declared here.
Write your query in script.sql. Use Run to inspect it, then Submit.
Declare PRIMARY KEY with both columns inside the same parentheses.