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
Iraida
5 days ago
D is too much work. Just update the existing record with C.
upvoted 0 times
...
Pauline
10 days ago
Option B seems okay, but it’s unnecessarily complicated.
upvoted 0 times
...
Andra
15 days ago
Agreed! C is clear and concise. No need for extra steps.
upvoted 0 times
...
Albina
20 days ago
I think option C is the best. It directly updates the activity.
upvoted 0 times
...
Valda
26 days ago
D is too much work. Just update, don’t delete!
upvoted 0 times
...
Aliza
1 month ago
Option B looks good too, but it’s a bit more complex.
upvoted 0 times
...
Youlanda
1 month ago
Agreed! C is clear and precise. No unnecessary steps.
upvoted 0 times
...
Ruby
1 month ago
I think option C is the best. It directly updates the activity.
upvoted 0 times
...
Keneth
2 months ago
Is it really okay to change the primary key like that?
upvoted 0 times
...
Margot
2 months ago
Definitely going with C, it’s straightforward.
upvoted 0 times
...
Laurel
3 months ago
Wait, why would you delete and insert? That's unnecessary!
upvoted 0 times
...
Malissa
3 months ago
I think B is better since it specifies the current activity.
upvoted 0 times
...
Shoshana
4 months ago
Option C looks correct to me!
upvoted 0 times
...
Diane
4 months ago
Is it really okay to assume the fee is always 100? Seems odd.
upvoted 0 times
...
Roslyn
4 months ago
Definitely going with C, it’s straightforward!
upvoted 0 times
...
Natalya
4 months ago
Wait, why would you delete and insert? D seems unnecessary.
upvoted 0 times
...
Leeann
4 months ago
I think B is better since it checks for the current activity.
upvoted 0 times
...
Ria
4 months ago
Option C looks correct to me.
upvoted 0 times
...
Casie
5 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
5 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
5 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
5 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