최신 MongoDB Certified Developer Associate C100DEV 무료샘플문제:
1. Select all true statements about MongoDB documents.
A) MongoDB documents are stored as BSON documents.
B) MongoDB documents are stored as JSON documents.
C) MongoDB documents have a flexible schema.
D) MongoDB documents must have the same fields in the collection.
2. Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to create a new user for an application that has the readWrite role. Use the db.createUser() command to create a user for a CRUD application. The requirements for this user are: -> role: readWrite on esmartdata database -> username: esmart -> password: esmart123 Which command should you use?
A) db.createUser({ user: 'esmart', pwd: 'esmart123', roles: [{role: 'read', db: 'esmartdata'}] })
B) db.createUser({ user: 'esmart', pwd: 'esmart123', roles: [{role: 'readWrite', db: ''}] })
C) db.createUser({ user: 'esmart', pwd: 'esmart123', roles: [{role: 'read+write', db: 'esmartdata'}] })
D) db.createUser({ user: 'esmart', pwd: 'esmart123', roles: [{role: 'readWrite', db: 'esmartdata'}] })
3. Data modeling. You are considering the use of nesting or references in your data model. Your data may change frequently. Which option would be more appropriate?
A) Use of reference.
B) Use of nesting.
4. A collection called players contains the following documents:
[ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3 } ]
You want to add additional fields to each document:
-> total_score (sum of the scores Array) -> avg_score (average score in scores Array) -> total_score_with_bonus (total_score + bonus) Expected output: [ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5, total_score: 196, avg_score: 39.2, total_score_with_bonus: 201 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3, total_score: 102, avg_score: 34, total_score_with_bonus: 105 } ]
Which query do you need to use?
A) db.players.aggregate([{ $addFields: { total_score: { $sum: '$scores' }, avg_score: { $avg: '$scores' } } }, { $addFields: { total_score_with_bonus: { $add: ['$total_score', '$bonus'] } } }])
B) db.players.aggregate([{ $addFields: { total_score: { $sum: '$scores' }, avg_score: { $avg: '$scores' }, total_score_with_bonus: { $add: ['$total_score', '$bonus'] } } }])
5. Assign typical operational tasks to the Mongo Developer.
A) read data
B) create user, create index
C) write data, read data
질문과 대답:
질문 # 1 정답: A,C | 질문 # 2 정답: D | 질문 # 3 정답: A | 질문 # 4 정답: A | 질문 # 5 정답: C |