Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CIW 1D0-541 Exam - Topic 3 Question 124 Discussion

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 andRes_Name are all represented by variable-length strings with a maximum of 20 characters. WhichSQL statement best implements the RESIDENT relation shown in this diagram?
D) CREATE TABLE RESIDENT ( R_ID INTEGER NOT NULL PRIMARY KEY, Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL, FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID));
A) CREATE TABLE RESIDENT ( R_ID INTEGER NULL PRIMARY KEY, Room_Num FLOAT, Res_Name VARCHAR, Building_ID INTEGER NULL, FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID));
B) CREATE TABLE RESIDENT ( R_ID INTEGER NOT NULL PRIMARY KEY, Room_Num BINARY, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL, FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID));
C) CREATE TABLE RESIDENT ( R_ID INTEGER NOT NULL PRIMARY KEY, Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL);

CIW 1D0-541 Exam - Topic 3 Question 124 Discussion

Actual exam question for CIW's 1D0-541 exam
Question #: 124
Topic #: 3
[All 1D0-541 Questions]

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 Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Tammara
27 days ago
I think C is missing the foreign key, so it’s not right.
upvoted 0 times
...
Kirk
1 month ago
Option D looks solid with the foreign key.
upvoted 0 times
...
Glory
2 months ago
I think option D is the best because it has the NOT NULL constraint for Building_ID and includes the foreign key reference.
upvoted 0 times
...
Derrick
2 months ago
I’m not sure about the data types; I thought Room_Num should be an integer, but I’m confused about the FLOAT in option A.
upvoted 0 times
...
Kristal
2 months ago
I feel like I’ve seen a similar question before, and I think the foreign key is important for linking to the BUILDING table.
upvoted 0 times
...
Fannie
2 months ago
I remember we discussed that the primary key should be NOT NULL, so I think options A and B are not correct.
upvoted 0 times
...

Save Cancel