Câu 47: C100DBA: MongoDB Associate Database Administrator
Consider a orders collection that contains these documents:{ _id: 1, product: “X-pad”, quantity: 950 }{ _id: 2, product: “X-pad-pro”, quantity: 1000 }{ _id: 3, product: “X-phone”, quantity: 850 }{ _id: 4, product: “X-phone-pro”, quantity: 1350 }Commands A and B are run at the same time. Assume that no other operations…
Nội dung câu hỏi
Consider a orders collection that contains these documents:{ _id: 1, product: “X-pad”, quantity: 950 }{ _id: 2, product: “X-pad-pro”, quantity: 1000 }{ _id: 3, product: “X-phone”, quantity: 850 }{ _id: 4, product: “X-phone-pro”, quantity: 1350 }Commands A and B are run at the same time. Assume that no other operations are running.A.)db.orders.findAndModify({query: { “product”: “X-phone” },update: { $set: { “quantity”: 1250 }}})B.)db.orders.updateMany({}, {$set: { “quantity”: 0 } })What is the possible findAndModify output and database state after these operations complete? (Choose two.)
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
-
A. Lựa chọn A bằng hình ảnh
-
B. Lựa chọn B bằng hình ảnh — đáp án hiện tại
-
C. Lựa chọn C bằng hình ảnh — đáp án hiện tại
-
D. Lựa chọn D bằng hình ảnh
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.