Exam 1D0-541 All QuestionsBrowse all questions from this exam
Question 7

Consider the Information Engineering diagram shown in the exhibit. Building_ID, R_ID, Room_Count and Room_Num are integer numbers, whereas Bldg_Name,

Location and Res_Name are all represented by variable-length strings with a maximum of 20 characters.

Which SQL statement best implements the RESIDENT relation shown in this diagram?

    Correct Answer: D

    The correct SQL statement should ensure that 'R_ID' is not null and is set as the primary key, 'Room_Num' is an integer, 'Res_Name' is a variable-length string with a maximum of 20 characters, and 'Building_ID' is not null with a foreign key constraint referencing 'Building_ID' in the BUILDING table. Option D meets all these requirements.

Discussion
dayogreatsOption: D

D has the most valid sql query