← All topics
Quiz: ER to Tables: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. In a 1:N relationship between Department (1) and Student (N), where does the foreign key go?
- Q2. How is an M:N relationship such as Student enrolls Course mapped?
- Q3. A student can have several phone numbers. What is the right design?
- Q4. The attribute "grade" in Student enrolls Course belongs in which table?
- Q5. Why is age usually not stored as a column?
- Q6. "Each department has exactly one head; most faculty are not heads." Where should the foreign key go?
- Q7. A course can have other courses as prerequisites. What kind of relationship is this?
- Q8. A weak entity Dependent is identified by (employee, dependent name). What is its table's primary key?
- Q9. The composite attribute name (first, last) becomes:
- Q10. What does the primary key (rollno, coursecode) on the enrollment table prevent?
- Q11. An ER design has Student (with a multivalued phone attribute), Course, and an M:N relationship "enrolls". How many tables does the mapping…
- Q12. Why is department.headid created as nullable at first?
- Q13. Why does a weak entity's foreign key to its owner usually use ON DELETE CASCADE?
- Q14. In the phone-count query, why is COUNT(p.phone) used after the LEFT JOIN instead of COUNT()?
- Q15. Listing each course with its prerequisite's title needs the course table twice. How is that written?