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
Lucy
4 days ago
Right? D ensures data integrity with the foreign key.
upvoted 0 times
...
Roxanne
9 days ago
I feel like A is too loose with NULLs.
upvoted 0 times
...
Francis
14 days ago
D is definitely correct. It meets all requirements.
upvoted 0 times
...
Reed
19 days ago
Option C is tempting, but it lacks the foreign key.
upvoted 0 times
...
Dorethea
24 days ago
I agree, D looks solid. Room_Num should be INTEGER, not FLOAT.
upvoted 0 times
...
Nan
30 days ago
I think option D is the best. It has all the right data types.
upvoted 0 times
...
Lucina
1 month ago
Is it really necessary to have NOT NULL for Building_ID? Seems strict.
upvoted 0 times
...
Azzie
1 month ago
Definitely going with D, it checks all the boxes!
upvoted 0 times
...
Johnetta
2 months ago
Wait, Room_Num should be an integer, right?
upvoted 0 times
...
Chanel
2 months ago
I think C is missing the foreign key, so it’s not right.
upvoted 0 times
...
An
2 months ago
Option D looks solid with the foreign key.
upvoted 0 times
...
James
2 months ago
Is it really necessary to have NOT NULL for Building_ID? Seems strict.
upvoted 0 times
...
Chu
2 months ago
Definitely going with D, it checks all the boxes!
upvoted 0 times
...
Rosalind
2 months ago
Wait, Room_Num should be an integer, right?
upvoted 0 times
...
Tammara
4 months ago
I think C is missing the foreign key, so it’s not right.
upvoted 0 times
...
Kirk
4 months ago
Option D looks solid with the foreign key.
upvoted 0 times
...
Glory
5 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
5 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
5 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
5 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