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 5 Question 122 Discussion

Consider the Recreation relation in the exhibit. A data operation that changes one of the tuplesfor Student_ID 1003 must be performed. It is necessary to change one of the activities fromswimming to tennis. The Student_ID and Activity attributes make up the primary key for theRecreation relation. All related information must be altered, as well. Which SQL statement orstatements would best accomplish this?
C) UPDATE Recreation SET Activity = 'Tennis', Activity_Fee = 100 WHERE Student_ID = 1003 AND Activity = 'Swimming';
A) UPDATE Recreation SET Activity, Activity_Fee ('Tennis', 100) WHERE Student_ID = 1003;
B) UPDATE TABLE Recreation SET ACTIVITY = 'Tennis', Activity_Fee = 100 WHERE Student_ID = 1003 AND Activity = Swimming;
D) DELETE Activity FROM Recreation WHERE Student_ID = 1003; INSERT INTO Recreation VALUES (1003, 'Tennis', 100);

CIW 1D0-541 Exam - Topic 5 Question 122 Discussion

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

Consider the Recreation relation in the exhibit. A data operation that changes one of the tuples

for Student_ID 1003 must be performed. It is necessary to change one of the activities from

swimming to tennis. The Student_ID and Activity attributes make up the primary key for the

Recreation relation. All related information must be altered, as well. Which SQL statement or

statements would best accomplish this?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Laurel
25 days ago
Wait, why would you delete and insert? That's unnecessary!
upvoted 0 times
...
Malissa
30 days ago
I think B is better since it specifies the current activity.
upvoted 0 times
...
Shoshana
1 month ago
Option C looks correct to me!
upvoted 0 times
...
Diane
1 month ago
Is it really okay to assume the fee is always 100? Seems odd.
upvoted 0 times
...
Roslyn
2 months ago
Definitely going with C, it’s straightforward!
upvoted 0 times
...
Natalya
2 months ago
Wait, why would you delete and insert? D seems unnecessary.
upvoted 0 times
...
Leeann
2 months ago
I think B is better since it checks for the current activity.
upvoted 0 times
...
Ria
2 months ago
Option C looks correct to me.
upvoted 0 times
...
Casie
2 months ago
I feel like option B is close, but it has the wrong syntax with "UPDATE TABLE." I think option C is definitely the best choice here.
upvoted 0 times
...
Marylou
2 months ago
I’m a bit confused about the DELETE and INSERT approach in option D. It seems like overkill for just changing an activity.
upvoted 0 times
...
Barney
3 months ago
I remember practicing a similar question where we had to update multiple fields. I think option C looks correct since it specifies both the new activity and the fee.
upvoted 0 times
...
Evan
3 months ago
I think we need to use the UPDATE statement, but I'm not sure if we should include the condition for the current activity.
upvoted 0 times
...

Save Cancel