nerdexam
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

C2090-558 question #106 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)
  • A
    6% (2)
  • B
    3% (1)
  • C
    81% (25)
  • E
    10% (3)

Community Discussion

No community discussion yet for this question.

Full C2090-558 Practice