Select the correct type of relationship for each scenario from the options: one-to-one, one-to-many, or many-to-many.
Relationships between models
Identify relationship types I
Report a typo
Choose one option for each row
| One-to-one | One-to-many | Many-to-many | |
|---|---|---|---|
| A book can be written by one or multiple authors, and each author can write multiple books. | |||
| A publisher can publish multiple books. | |||
| A student can enroll into multiple courses, and one course can be taken by multiple students. | |||
| An instructor can teach multiple courses | |||
| A country has a unique capital city. |
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.