1D0-541 Exam QuestionsBrowse all questions from this exam

1D0-541 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?

Show Answer
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

1 comment
Sign in to comment
dayogreatsOption: D
Aug 3, 2023

D has the most valid sql query