Django Features and Libraries | Week 6
Course Name: Django for Everybody
Sub-course: Django Features and Libraries
Course Link: Django for Everybody
Sub-course Link: Django Features and Libraries
These are Django Features and Libraries Week 6 Answers Coursera Quiz
Many to Many
Q1. A one-to-many relationship in a data model involved two database tables. How many tables are involved in representing a many-to-many relationship?
- 5
- 1
- 2
- 4
- 3
Answer: 3
Q2. If you were looking at a link in a data model diagram, which of these would represent a many-to-many relationship?
- 0 — 0
- 1 — 1
- 2 — 2
- 1 — 0..*
- 0..* — 1..*
Answer: 0..* — 1..*
These are Django Features and Libraries Week 6 Answers Coursera Quiz
Q3. In Django, what type of field is used to represent a many-to-many relationship?
- models.ThroughKey
- models.ForeignKey
- models.ManyToManyField
- models.ManyToManyRelationship
- models.IntField
Answer: models.ManyToManyField
Q4. Which of the following is NOT a common name for the additional table needed to represent a many-to-many relationship between two tables?
- Junction Table
- Association Table
- Through Table
- Join Table
- Bridge Table
- Lookup table
Answer: Lookup table
These are Django Features and Libraries Week 6 Answers Coursera Quiz
Q5. In models.py when you want to explicitly model a Junction table, what is the attribute in the two lined table models used to indicate which Junction table to use to connect the two tables?
- junction
- join_through
- join
- through
- on_delete
Answer: through
Q6. What kind of model fields will be found in every Junction table?
- models.JunctionFields
- models.OutboundKeys
- models.ManyToManyField
- models.CharField
- models.ForeignKey
Answer: models.ForeignKey
These are Django Features and Libraries Week 6 Answers Coursera Quiz
Q7. If you have a many-to-many relationship between books and authors and you are inserting a new author for a book, which of the following orders of operations will work?
- insert the connection, insert the book, insert the author
- insert the connection, insert the author, insert the book
- insert the book, insert the author, insert the connection
- insert the book, insert the connection, insert the author
Answer: insert the book, insert the author, insert the connection
Q8. You should never have any fields other than keys in a Junction table.
- True
- False
Answer: False
These are Django Features and Libraries Week 6 Answers Coursera Quiz
More Weeks of this course: Click Here
More Coursera Courses: http://progiez.com/coursera