Recall & Review
beginner
What does the read built-in role in MongoDB allow a user to do?
The read role allows a user to read data from all non-system collections and views in a database. It does not allow any write or administrative actions.
Click to reveal answer
beginner
What permissions does the readWrite role grant in MongoDB?
The readWrite role allows a user to read and write data on all non-system collections and views in a database. This includes inserting, updating, and deleting documents.
Click to reveal answer
intermediate
What is the purpose of the dbAdmin role in MongoDB?
The dbAdmin role provides administrative privileges on a database, such as creating and modifying indexes, viewing statistics, but it does not allow reading or writing data.
Click to reveal answer
beginner
Can a user with the read role modify data in MongoDB?
No, a user with the read role can only view data. They cannot insert, update, or delete any documents.
Click to reveal answer
intermediate
Which built-in MongoDB role should you assign to a user who needs to manage indexes but not modify data?
You should assign the dbAdmin role because it allows managing indexes and other administrative tasks without granting read or write access to data.
Click to reveal answer
Which MongoDB built-in role allows a user to only read data but not modify it?
✗ Incorrect
The 'read' role grants read-only access to data without any write or admin privileges.
What actions can a user with the 'readWrite' role perform?
✗ Incorrect
The 'readWrite' role allows both reading and modifying data in the database.
Which role is best for a user who needs to create indexes but should not read or write data?
✗ Incorrect
The 'dbAdmin' role allows administrative tasks like creating indexes without data access.
Does the 'dbAdmin' role allow a user to delete documents?
✗ Incorrect
The 'dbAdmin' role does not grant permissions to modify data, including deleting documents.
If a user needs full read and write access to a database, which role should they have?
✗ Incorrect
The 'readWrite' role provides full read and write access to the database.
Explain the differences between the MongoDB built-in roles: read, readWrite, and dbAdmin.
Think about what each role lets a user do with data and database management.
You got /4 concepts.
Describe a real-life scenario where you would assign the dbAdmin role instead of readWrite or read.
Consider tasks that involve managing the database but not changing data.
You got /3 concepts.