IBM
C2090-558 · Question #106
Click the Exhibit button. The tables shown in the exhibit have been created for a class enrollment system where a course can be assigned to many classes. The class table joins to the course table on…
The correct answer is C. ALTER TABLE course ADD CONSTRAINT (PRIMARY KEY (course_num)); D. ALTER TABLE class ADD CONSTRAINT (FOREIGN KEY (course_num) REFERENCES course). See the full explanation below for the reasoning.
Question
Click the Exhibit button. The tables shown in the exhibit have been created for a class enrollment system where a course can be assigned to many classes. The class table joins to the course table on the course_num columns. Which two of the following SQL statements are required to establish a referential integrity relationship between these tables? (Choose two.)
Exhibit
Options
- AALTER TABLE class ADD CONSTRAINT (PRIMARY KEY (class_id));
- BALTER TABLE class ADD CONSTRAINT (PRIMARY KEY (course_num));
- CALTER TABLE course ADD CONSTRAINT (PRIMARY KEY (course_num));
- DALTER TABLE class ADD CONSTRAINT (FOREIGN KEY (course_num) REFERENCES course);
- EALTER TABLE course ADD CONSTRAINT (FOREIGN KEY (course_num) REFERENCES class);
How the community answered
(31 responses)- A6% (2)
- B3% (1)
- C81% (25)
- E10% (3)
Community Discussion
No community discussion yet for this question.
