0% found this document useful (0 votes)
19 views56 pages

n8 Merged

Uploaded by

Priyanka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views56 pages

n8 Merged

Uploaded by

Priyanka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 4 Practice Quiz

Started on Friday, 25 October 2024, 12:27 AM


State Finished
Completed on Friday, 25 October 2024, 12:28 AM
Time taken 13 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

17. To update a document by replacing it completely, which method is used?

a. `update_one()`
b. `update()`
c. `replace_one()`
d. `modify()`

The correct answer is: `replace_one()`

Question 2

Not answered

Marked out of 1.00

38. To find documents where a field value is within a specific array, which operator is used?

a. `$within`
b. `$exists`
c. `$in`
d. `$contains`

The correct answer is: `$in`

Question 3
Not answered

Marked out of 1.00

8. To update multiple documents that match a query in MongoDB, which method is used?

a. `update_many()`
b. `update()`
c. `modify_many()`
d. `replace_many()`

The correct answer is: `update_many()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 1/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

43. To aggregate documents and calculate the maximum value of a field, which operator is used?

a. `$top`
b. `$largest`
c. `$highest`
d. `$max`

The correct answer is: `$max`

Question 5
Not answered

Marked out of 1.00

4. Which method is used to delete a document from a MongoDB collection?

a. `delete()`
b. `delete_one()`
c. `erase()`
d. `remove()`

The correct answer is: `delete_one()`

Question 6
Not answered

Marked out of 1.00

25. How can you perform a case-insensitive search in MongoDB using regular expressions?

a. `regex('pattern', 'i')`
b. `regex('pattern', 'ci')`
c. `/pattern/i`
d. `/pattern/ci`

The correct answer is: `/pattern/i`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 2/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

5. How do you find a document in a MongoDB collection using PyMongo?

a. `retrieve()`
b. `find()`
c. `search()`
d. `get()`

The correct answer is: `find()`

Question 8
Not answered

Marked out of 1.00

3. To insert a new document into a MongoDB collection using PyMongo, which method is used?

a. `create()`
b. `put()`
c. `insert_one()`
d. `add_document()`

The correct answer is: `insert_one()`

Question 9
Not answered

Marked out of 1.00

31. How do you ensure that a field value is updated if it already exists or inserted if it doesn’t?

a. `insert_or_update()`
b. `upsert()`
c. `update()`
d. `update_one()`

The correct answer is: `upsert()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 3/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

28. How can you delete multiple documents that match a query in MongoDB?

a. `delete_many()`
b. `drop_many()`
c. `remove_many()`
d. `erase_many()`

The correct answer is: `delete_many()`

Question 11
Not answered

Marked out of 1.00

10. What method would you use to perform aggregation operations in MongoDB?

a. `merge()`
b. `group()`
c. `combine()`
d. `aggregate()`

The correct answer is: `aggregate()`

Question 12
Not answered

Marked out of 1.00

2. Which Python library is commonly used for MongoDB operations?

a. pyodbc
b. pymongo
c. sqlalchemy
d. psycopg2

The correct answer is: pymongo

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 4/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

46. To add a field to each document in the output of an aggregation pipeline, which stage is used?

a. `$extend`
b. `$addFields`
c. `$include`
d. `$append`

The correct answer is: `$addFields`

Question 14
Not answered

Marked out of 1.00

49. How do you filter documents to include only those that meet multiple criteria?

a. `$filter`
b. `$and`
c. `$or`
d. `$match`

The correct answer is: `$and`

Question 15
Not answered

Marked out of 1.00

7. Which method updates a single document in a MongoDB collection?

a. `update()`
b. `modify()`
c. `replace_one()`
d. `update_one()`

The correct answer is: `update_one()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 5/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

24. What is the purpose of the `$lookup` stage in an aggregation pipeline?

a. Filter documents
b. Project fields
c. Sort documents
d. Join collections

The correct answer is: Join collections

Question 17
Not answered

Marked out of 1.00

44. What is the purpose of the `$limit` stage in an aggregation pipeline?

a. Adds fields to the documents


b. Joins collections
c. Filters documents
d. Limits the number of documents in the output

The correct answer is: Limits the number of documents in the output

Question 18
Not answered

Marked out of 1.00

34. How can you match documents where a field value is greater than a specified value?

a. `$greater`
b. `$gt`
c. `$more`
d. `$above`

The correct answer is: `$gt`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 6/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

16. In MongoDB, how can you find documents where a field value is within a specific range?

a. `$gt` and `$lt`


b. `$range`
c. `$between`
d. `$in`

The correct answer is: `$gt` and `$lt`

Question 20
Not answered

Marked out of 1.00

47. Which method is used to count the number of documents in a MongoDB collection?

a. `count_documents()`
b. `count()`
c. `size()`
d. `length()`

The correct answer is: `count_documents()`

◄ Unit 3 Practice Quiz

Jump to...

Unit 5 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320252&cmid=31264 7/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 4 Practice Quiz

Started on Friday, 25 October 2024, 12:27 AM


State Finished
Completed on Friday, 25 October 2024, 12:27 AM
Time taken 11 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

37. Which operator is used to perform a logical OR operation in MongoDB queries?

a. `$or`
b. `$logical_or`
c. `$union`
d. `$combine`

The correct answer is: `$or`

Question 2

Not answered

Marked out of 1.00

3. To insert a new document into a MongoDB collection using PyMongo, which method is used?

a. `put()`
b. `create()`
c. `insert_one()`
d. `add_document()`

The correct answer is: `insert_one()`

Question 3
Not answered

Marked out of 1.00

27. To find documents where a field value exists and is not null, which operator is used?

a. `$has`
b. `$exists`
c. `$notNull`
d. `$defined`

The correct answer is: `$exists`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 1/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

26. Which operator is used to match documents where a field is not equal to a given value?

a. `$neq`
b. `$ne`
c. `$diff`
d. `$not`

The correct answer is: `$ne`

Question 5
Not answered

Marked out of 1.00

29. To calculate the total sum of a field across documents, which aggregation operator is used?

a. `$sum`
b. `$add`
c. `$count`
d. `$total`

The correct answer is: `$sum`

Question 6
Not answered

Marked out of 1.00

33. Which operator would you use to return documents where the field value matches an array of values?

a. `$array`
b. `$match`
c. `$in`
d. `$contains`

The correct answer is: `$in`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 2/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

19. How do you sort query results in descending order by a field in MongoDB?

a. `sort({field: -1})`
b. `sort({field: 'desc'})`
c. `order({field: 'desc'})`
d. `order_by({field: -1})`

The correct answer is: `sort({field: -1})`

Question 8
Not answered

Marked out of 1.00

22. To include only specific fields in the output documents using an aggregation pipeline, which operator is used?

a. `$project`
b. `$include`
c. `$filter`
d. `$select`

The correct answer is: `$project`

Question 9
Not answered

Marked out of 1.00

36. What does the `$addFields` stage do in an aggregation pipeline?

a. Adds new fields or modifies existing fields


b. Joins collections
c. Removes fields
d. Filters documents

The correct answer is: Adds new fields or modifies existing fields

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 3/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

23. Which operator would you use to concatenate strings in MongoDB aggregation?

a. `$combine`
b. `$join`
c. `$merge`
d. `$concat`

The correct answer is: `$concat`

Question 11
Not answered

Marked out of 1.00

21. What is the purpose of the `$project` stage in an aggregation pipeline?

a. Sorts documents
b. Filters fields in documents
c. Limits documents
d. Groups documents

The correct answer is: Filters fields in documents

Question 12
Not answered

Marked out of 1.00

4. Which method is used to delete a document from a MongoDB collection?

a. `erase()`
b. `remove()`
c. `delete_one()`
d. `delete()`

The correct answer is: `delete_one()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 4/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

13. What does the `$match` operator do in an aggregation pipeline?

a. Groups documents
b. Sorts documents
c. Limits the number of documents
d. Filters documents

The correct answer is: Filters documents

Question 14
Not answered

Marked out of 1.00

32. What method would you use to check the existence of a collection in MongoDB?

a. `check_collection()`
b. `get_collection()`
c. `has_collection()`
d. `list_collections()`

The correct answer is: `list_collections()`

Question 15
Not answered

Marked out of 1.00

6. What is the default return type of the `find()` method in PyMongo?

a. String
b. Cursor
c. Dictionary
d. List

The correct answer is: Cursor

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 5/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

14. To calculate the total count of documents in a MongoDB collection, which aggregation operator is used?

a. `$aggregate`
b. `$count`
c. `$sum`
d. `$total`

The correct answer is: `$count`

Question 17
Not answered

Marked out of 1.00

40. To find documents with a field value less than a specified value, which operator is used?

a. `$lt`
b. `$below`
c. `$less`
d. `$smaller`

Question 18
Not answered

Marked out of 1.00

35. To exclude a field from the results of a MongoDB query, which projection operator is used?

a. `0`
b. `omit`
c. `exclude`
d. `-`

The correct answer is: `0`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 6/7
10/25/24, 12:26 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

50. To match documents where a field contains a substring, which operator is used in MongoDB?

a. `$contains`
b. `$like`
c. `$regex`
d. `$substring`

The correct answer is: `$regex`

Question 20
Not answered

Marked out of 1.00

48. To replace a document that matches a query, which method is used?

a. `replace_one()`
b. `update_one()`
c. `change_one()`
d. `modify_one()`

The correct answer is: `replace_one()`

◄ Unit 3 Practice Quiz

Jump to...

Unit 5 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320251&cmid=31264 7/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 4 Practice Quiz

Started on Friday, 25 October 2024, 12:26 AM


State Finished
Completed on Friday, 25 October 2024, 12:26 AM
Time taken 13 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

10. What method would you use to perform aggregation operations in MongoDB?

a. `aggregate()`
b. `merge()`
c. `group()`
d. `combine()`

The correct answer is: `aggregate()`

Question 2

Not answered

Marked out of 1.00

6. What is the default return type of the `find()` method in PyMongo?

a. Cursor
b. Dictionary
c. List
d. String

The correct answer is: Cursor

Question 3
Not answered

Marked out of 1.00

21. What is the purpose of the `$project` stage in an aggregation pipeline?

a. Groups documents
b. Sorts documents
c. Filters fields in documents
d. Limits documents

The correct answer is: Filters fields in documents

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 1/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

17. To update a document by replacing it completely, which method is used?

a. `replace_one()`
b. `update()`
c. `modify()`
d. `update_one()`

The correct answer is: `replace_one()`

Question 5
Not answered

Marked out of 1.00

39. How can you update documents based on a condition using PyMongo?

a. `replace()`
b. `modify()`
c. `update_many()`
d. `update()`

The correct answer is: `update_many()`

Question 6
Not answered

Marked out of 1.00

38. To find documents where a field value is within a specific array, which operator is used?

a. `$within`
b. `$in`
c. `$exists`
d. `$contains`

The correct answer is: `$in`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 2/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

29. To calculate the total sum of a field across documents, which aggregation operator is used?

a. `$add`
b. `$sum`
c. `$count`
d. `$total`

The correct answer is: `$sum`

Question 8
Not answered

Marked out of 1.00

11. Which aggregation operator is used to group documents by a specific field?

a. `$project`
b. `$group`
c. `$sort`
d. `$match`

The correct answer is: `$group`

Question 9
Not answered

Marked out of 1.00

25. How can you perform a case-insensitive search in MongoDB using regular expressions?

a. `regex('pattern', 'ci')`
b. `/pattern/i`
c. `/pattern/ci`
d. `regex('pattern', 'i')`

The correct answer is: `/pattern/i`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 3/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

36. What does the `$addFields` stage do in an aggregation pipeline?

a. Adds new fields or modifies existing fields


b. Joins collections
c. Removes fields
d. Filters documents

The correct answer is: Adds new fields or modifies existing fields

Question 11
Not answered

Marked out of 1.00

30. Which operator is used to compute the standard deviation of a field in MongoDB aggregation?

a. `$stdDev`
b. `$stdDevPop`
c. `$stddev`
d. `$stdev`

The correct answer is: `$stdDevPop`

Question 12
Not answered

Marked out of 1.00

28. How can you delete multiple documents that match a query in MongoDB?

a. `drop_many()`
b. `delete_many()`
c. `remove_many()`
d. `erase_many()`

The correct answer is: `delete_many()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 4/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

41. How can you retrieve only distinct values of a field from a MongoDB collection?

a. `different()`
b. `unique()`
c. `distinct()`
d. `only()`

The correct answer is: `distinct()`

Question 14
Not answered

Marked out of 1.00

15. Which operator would you use to calculate the average of a field in an aggregation pipeline?

a. `$average`
b. `$mean`
c. `$avg`
d. `$median`

The correct answer is: `$avg`

Question 15
Not answered

Marked out of 1.00

43. To aggregate documents and calculate the maximum value of a field, which operator is used?

a. `$largest`
b. `$max`
c. `$top`
d. `$highest`

The correct answer is: `$max`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 5/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

46. To add a field to each document in the output of an aggregation pipeline, which stage is used?

a. `$append`
b. `$extend`
c. `$addFields`
d. `$include`

The correct answer is: `$addFields`

Question 17
Not answered

Marked out of 1.00

44. What is the purpose of the `$limit` stage in an aggregation pipeline?

a. Joins collections
b. Adds fields to the documents
c. Limits the number of documents in the output
d. Filters documents

The correct answer is: Limits the number of documents in the output

Question 18
Not answered

Marked out of 1.00

7. Which method updates a single document in a MongoDB collection?

a. `modify()`
b. `replace_one()`
c. `update_one()`
d. `update()`

The correct answer is: `update_one()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 6/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

40. To find documents with a field value less than a specified value, which operator is used?

a. `$less`
b. `$below`
c. `$lt`
d. `$smaller`

Question 20
Not answered

Marked out of 1.00

16. In MongoDB, how can you find documents where a field value is within a specific range?

a. `$gt` and `$lt`


b. `$between`
c. `$in`
d. `$range`

The correct answer is: `$gt` and `$lt`

◄ Unit 3 Practice Quiz

Jump to...

Unit 5 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320250&cmid=31264 7/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 4 Practice Quiz

Started on Friday, 25 October 2024, 12:23 AM


State Finished
Completed on Friday, 25 October 2024, 12:24 AM
Time taken 18 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

49. How do you filter documents to include only those that meet multiple criteria?

a. `$filter`
b. `$or`
c. `$and`
d. `$match`

The correct answer is: `$and`

Question 2

Not answered

Marked out of 1.00

45. How do you perform a case-sensitive search for a string field in MongoDB?

a. `match('pattern')`
b. `regex('pattern')`
c. `/pattern/`
d. `/pattern/i`

The correct answer is: `/pattern/`

Question 3
Not answered

Marked out of 1.00

2. Which Python library is commonly used for MongoDB operations?

a. psycopg2
b. sqlalchemy
c. pyodbc
d. pymongo

The correct answer is: pymongo

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 1/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

47. Which method is used to count the number of documents in a MongoDB collection?

a. `length()`
b. `count()`
c. `size()`
d. `count_documents()`

The correct answer is: `count_documents()`

Question 5
Not answered

Marked out of 1.00

23. Which operator would you use to concatenate strings in MongoDB aggregation?

a. `$join`
b. `$combine`
c. `$merge`
d. `$concat`

The correct answer is: `$concat`

Question 6
Not answered

Marked out of 1.00

20. In PyMongo, which method allows you to skip a number of documents in a query?

a. `exclude()`
b. `skip()`
c. `omit()`
d. `ignore()`

The correct answer is: `skip()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 2/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

18. Which method is used to limit the number of results returned by a query in PyMongo?

a. `take()`
b. `restrict()`
c. `max_results()`
d. `limit()`

The correct answer is: `limit()`

Question 8
Not answered

Marked out of 1.00

9. How can you use regular expressions in MongoDB queries?

a. By using the `re` module


b. By using the `regex` operator
c. By using the `search()` method
d. By using the `find()` method

The correct answer is: By using the `regex` operator

Question 9
Not answered

Marked out of 1.00

37. Which operator is used to perform a logical OR operation in MongoDB queries?

a. `$or`
b. `$logical_or`
c. `$union`
d. `$combine`

The correct answer is: `$or`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 3/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

1. What does CRUD stand for in database operations?

a. Create, Read, Update, Delete


b. Create, Read, Update, Design
c. Connect, Read, Update, Delete
d. Connect, Retrieve, Update, Delete

The correct answer is: Create, Read, Update, Delete

Question 11
Not answered

Marked out of 1.00

34. How can you match documents where a field value is greater than a specified value?

a. `$greater`
b. `$above`
c. `$gt`
d. `$more`

The correct answer is: `$gt`

Question 12
Not answered

Marked out of 1.00

31. How do you ensure that a field value is updated if it already exists or inserted if it doesn’t?

a. `upsert()`
b. `update()`
c. `insert_or_update()`
d. `update_one()`

The correct answer is: `upsert()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 4/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

24. What is the purpose of the `$lookup` stage in an aggregation pipeline?

a. Join collections
b. Sort documents
c. Filter documents
d. Project fields

The correct answer is: Join collections

Question 14
Not answered

Marked out of 1.00

13. What does the `$match` operator do in an aggregation pipeline?

a. Filters documents
b. Limits the number of documents
c. Groups documents
d. Sorts documents

The correct answer is: Filters documents

Question 15
Not answered

Marked out of 1.00

8. To update multiple documents that match a query in MongoDB, which method is used?

a. `update()`
b. `update_many()`
c. `replace_many()`
d. `modify_many()`

The correct answer is: `update_many()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 5/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

5. How do you find a document in a MongoDB collection using PyMongo?

a. `get()`
b. `retrieve()`
c. `find()`
d. `search()`

The correct answer is: `find()`

Question 17
Not answered

Marked out of 1.00

26. Which operator is used to match documents where a field is not equal to a given value?

a. `$not`
b. `$diff`
c. `$neq`
d. `$ne`

The correct answer is: `$ne`

Question 18
Not answered

Marked out of 1.00

32. What method would you use to check the existence of a collection in MongoDB?

a. `has_collection()`
b. `get_collection()`
c. `check_collection()`
d. `list_collections()`

The correct answer is: `list_collections()`

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 6/7
10/25/24, 12:25 AM Unit 4 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

12. Which operator is used to sort documents in an aggregation pipeline?

a. `$sort`
b. `$limit`
c. `$match`
d. `$group`

The correct answer is: `$sort`

Question 20
Not answered

Marked out of 1.00

42. What method is used to update multiple documents that match a query and create new documents if no matches are found?

a. `update()`
b. `create_or_update()`
c. `upsert()`
d. `update_many()`

The correct answer is: `upsert()`

◄ Unit 3 Practice Quiz

Jump to...

Unit 5 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320247&cmid=31264 7/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 3 Practice Quiz

Started on Friday, 25 October 2024, 12:23 AM


State Finished
Completed on Friday, 25 October 2024, 12:23 AM
Time taken 12 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

In MongoDB, how does the performance impact of a single-field index compare to a compound index?

a. Single-field indexes are more efficient than compound indexes for all types of queries.
b. Compound indexes are faster for single-field queries compared to single-field indexes.
c. Single-field indexes are generally faster for queries on a single field, while compound indexes are better for queries involving
multiple fields.
d. Single-field indexes are only useful for text searches, while compound indexes cannot be used for text searches.

The correct answer is: Single-field indexes are generally faster for queries on a single field, while compound indexes are better for queries
involving multiple fields.

Question 2
Not answered

Marked out of 1.00

How does a high read ratio to write ratio affect database performance?

a. It typically indicates a need to optimize read operations and indexing.


b. It suggests that write operations are the bottleneck in performance.
c. It implies a need for better data encryption practices.
d. It indicates that data replication strategies need to be improved.

The correct answer is: It typically indicates a need to optimize read operations and indexing.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 1/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 3

Not answered

Marked out of 1.00

In what situation would you use a unique index?

a. To allow duplicate values in a field while optimizing query performance.


b. To improve the performance of full-text search queries.
c. To support faster aggregation queries.
d. To ensure that no two documents have the same value for a specified field.

The correct answer is: To ensure that no two documents have the same value for a specified field.

Question 4
Not answered

Marked out of 1.00

Which type of index would be most appropriate for optimizing queries that involve sorting and filtering on multiple columns?

a. Geospatial index
b. Compound index
c. Multi-key index
d. Single-field index

The correct answer is: Compound index

Question 5
Not answered

Marked out of 1.00

How can you improve query performance for searches involving array fields?

a. By implementing a text index.


b. By using a multi-key index.
c. By creating a compound index.
d. By applying a single-field index.

The correct answer is: By using a multi-key index.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 2/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 6

Not answered

Marked out of 1.00

What is an example of a situation where a multi-key index would be beneficial?

a. When enforcing unique constraints on a field.


b. When querying a collection of documents with embedded arrays.
c. When sorting documents based on a single field.
d. When querying a collection for specific text in a field.

The correct answer is: When querying a collection of documents with embedded arrays.

Question 7
Not answered

Marked out of 1.00

What does the term "schema" refer to in a database context?

a. The physical storage location of database files.


b. The process of backing up and restoring data.
c. The structure and organization of data within the database.
d. The set of permissions and security settings for database access.

The correct answer is: The structure and organization of data within the database.

Question 8
Not answered

Marked out of 1.00

What is the main advantage of using a memory-mapped file system in a database?

a. It allows for faster access to data by mapping files directly into memory.
b. It provides better encryption for stored data.
c. It automatically balances data across multiple storage devices.
d. It simplifies database schema design.

The correct answer is: It allows for faster access to data by mapping files directly into memory.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 3/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 9

Not answered

Marked out of 1.00

What is the role of an associative table in a many-to-many (N:M) relationship?

a. To improve the performance of single-table queries.


b. To store the relationships between records in the two tables.
c. To replace the need for foreign keys in the two tables.
d. To store a summary of the records in the two related tables.

The correct answer is: To store the relationships between records in the two tables.

Question 10
Not answered

Marked out of 1.00

Which indexing strategy is best suited for queries that filter and sort on multiple fields?

a. Single-field index
b. Compound index
c. Multi-key index
d. Geospatial index

The correct answer is: Compound index

Question 11
Not answered

Marked out of 1.00

What does the term "schema design" refer to in database management?

a. The configuration of database server hardware.


b. The process of defining the structure and organization of database tables and relationships.
c. The implementation of security protocols for database access.
d. The management of backup and recovery procedures.

The correct answer is: The process of defining the structure and organization of database tables and relationships.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 4/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 12

Not answered

Marked out of 1.00

What type of index would you use to optimize a query for searching and sorting text fields?

a. Multi-key index
b. Compound index
c. Single-field index
d. Text index

The correct answer is: Text index

Question 13
Not answered

Marked out of 1.00

In which scenario is a multi-key index particularly useful?

a. When dealing with documents that contain arrays.


b. When searching for specific text in a field.
c. When optimizing queries that sort on multiple fields.
d. When enforcing uniqueness across fields.

The correct answer is: When dealing with documents that contain arrays.

Question 14
Not answered

Marked out of 1.00

What does a compound index improve in a database query?

a. Disk space usage for index storage.


b. Performance of queries that use a single field for searching and sorting.
c. Performance of queries that use multiple fields for searching and sorting.
d. The ability to perform full-text searches efficiently.

The correct answer is: Performance of queries that use multiple fields for searching and sorting.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 5/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 15

Not answered

Marked out of 1.00

What is a key consideration when tuning the WiredTiger storage engine?

a. Changing the data replication strategy.


b. Adjusting the cache size and compression settings.
c. Increasing the number of collections.
d. Modifying the index structure.

The correct answer is: Adjusting the cache size and compression settings.

Question 16
Not answered

Marked out of 1.00

What role does metadata play in a database schema?

a. It handles transaction management.


b. It manages data encryption and security.
c. It stores the actual content of the database tables.
d. It provides information about the structure and organization of the data.

The correct answer is: It provides information about the structure and organization of the data.

Question 17
Not answered

Marked out of 1.00

Which of the following describes a foreign key constraint in a one-to-many relationship?

a. It enforces that each record in the "one" table can have multiple related records in the "many" table.
b. It enforces that each record in the "many" table corresponds to one record in the "one" table.
c. It ensures that each record in the "one" table must have a unique value in the "many" table.
d. It prevents the "one" table from having duplicate records.

The correct answer is: It enforces that each record in the "one" table can have multiple related records in the "many" table.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 6/7
10/25/24, 12:22 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 18

Not answered

Marked out of 1.00

What type of index should be used to improve performance for queries involving sorting on multiple fields?

a. Compound index
b. Geospatial index
c. Single-field index
d. Multi-key index

The correct answer is: Compound index

Question 19
Not answered

Marked out of 1.00

How would you model a onetomany (1:N) relationship where the "one" side is the parent and the "many" side are child documents?

a. Combine both in a single database table

b. Store child documents in a separate collection and use references

c. Use separate databases for each side of the relationship

d. Embed child documents within the parent document

Your answer is incorrect.

The correct answer is: Embed child documents within the parent document

Question 20
Not answered

Marked out of 1.00

How can the performance of the WiredTiger storage engine be tuned?

a. By changing the size of memory-mapped files.


b. By increasing the number of replica sets.
c. By modifying the number of indexes.
d. By adjusting cache size and compression settings.

The correct answer is: By adjusting cache size and compression settings.

◄ Unit 2 Practice Quiz

Jump to...

Unit 4 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320246&cmid=31263 7/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 3 Practice Quiz

Started on Friday, 25 October 2024, 12:22 AM


State Finished
Completed on Friday, 25 October 2024, 12:22 AM
Time taken 10 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

What does a compound index improve in a database query?

a. Performance of queries that use a single field for searching and sorting.
b. The ability to perform full-text searches efficiently.
c. Disk space usage for index storage.
d. Performance of queries that use multiple fields for searching and sorting.

The correct answer is: Performance of queries that use multiple fields for searching and sorting.

Question 2

Not answered

Marked out of 1.00

Which of the following describes a foreign key constraint in a one-to-many relationship?

a. It prevents the "one" table from having duplicate records.


b. It enforces that each record in the "many" table corresponds to one record in the "one" table.
c. It ensures that each record in the "one" table must have a unique value in the "many" table.
d. It enforces that each record in the "one" table can have multiple related records in the "many" table.

The correct answer is: It enforces that each record in the "one" table can have multiple related records in the "many" table.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 1/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 3

Not answered

Marked out of 1.00

How does a foreign key constraint ensure referential integrity in a database?

a. By ensuring that values in the foreign key field of one table correspond to values in the primary key field of another table.
b. By preventing duplicate values in the foreign key field.
c. By automatically updating related records when a referenced record is updated.
d. By allowing null values in the foreign key field.

The correct answer is: By ensuring that values in the foreign key field of one table correspond to values in the primary key field of another
table.

Question 4
Not answered

Marked out of 1.00

What does the term "metadata" in database systems refer to?

a. The physical storage structure of the database.


b. The configuration settings of the database server.
c. Data that describes other data within the database.
d. The actual data stored in tables.

The correct answer is: Data that describes other data within the database.

Question 5

Not answered

Marked out of 1.00

Which of the following is a benefit of using the MMAP storage engine?

a. It supports document-level locking for better concurrency control.


b. It provides efficient access to data by mapping files into memory.
c. It offers advanced compression techniques for data storage.
d. It uses an in-memory data structure for faster read and write operations.

The correct answer is: It provides efficient access to data by mapping files into memory.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 2/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 6

Not answered

Marked out of 1.00

Which MongoDB storage engine is known for its support of document-level locking?

a. In-Memory
b. RocksDB
c. MMAP
d. WiredTiger

The correct answer is: WiredTiger

Question 7
Not answered

Marked out of 1.00

In a one to one (1:1) relationship, how is data typically stored in MongoDB?

a. In multiple databases

b. All related data in a single document

c. In separate collections, linked by a foreign key

d. In separate documents within the same collection

Your answer is incorrect.


The correct answer is: All related data in a single document

Question 8
Not answered

Marked out of 1.00

What does a multi-key index allow a database to do?

a. Improve performance for queries involving multiple collections.


b. Index documents that contain arrays and perform efficient queries on them.
c. Index nested objects within documents.
d. Create unique constraints across multiple fields.

The correct answer is: Index documents that contain arrays and perform efficient queries on them.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 3/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 9

Not answered

Marked out of 1.00

In what situation would you use a unique index?

a. To allow duplicate values in a field while optimizing query performance.


b. To improve the performance of full-text search queries.
c. To ensure that no two documents have the same value for a specified field.
d. To support faster aggregation queries.

The correct answer is: To ensure that no two documents have the same value for a specified field.

Question 10
Not answered

Marked out of 1.00

What is the advantage of using an associative table in a many-to-many relationship?

a. It replaces the need for foreign key constraints.


b. It simplifies the structure of each table involved in the relationship.
c. It optimizes single-table queries.
d. It effectively manages the relationships between records in two different tables.

The correct answer is: It effectively manages the relationships between records in two different tables.

Question 11
Not answered

Marked out of 1.00

Which indexing strategy is ideal for queries that include array fields?

a. Compound index
b. Single-field index
c. Multi-key index
d. Text index

The correct answer is: Multi-key index

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 4/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 12

Not answered

Marked out of 1.00

Which type of index would be most appropriate for optimizing queries that involve sorting and filtering on multiple columns?

a. Compound index
b. Single-field index
c. Multi-key index
d. Geospatial index

The correct answer is: Compound index

Question 13
Not answered

Marked out of 1.00

What is the impact of a high read ratio to write ratio on database performance?

a. It indicates that the database is optimized for read-heavy workloads.


b. It indicates that the database has insufficient indexing.
c. It suggests that the database may suffer from write contention issues.
d. It suggests that the database is optimized for write-heavy workloads.

The correct answer is: It indicates that the database is optimized for read-heavy workloads.

Question 14
Not answered

Marked out of 1.00

How does a document-level lock in the WiredTiger storage engine affect concurrency?

a. It prevents any concurrent access to the same document.


b. It is less efficient than file-level locking.
c. It allows concurrent access only for read operations.
d. It allows multiple operations to access different documents concurrently.

The correct answer is: It allows multiple operations to access different documents concurrently.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 5/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 15

Not answered

Marked out of 1.00

What does the term "schema design" refer to in database management?

a. The management of backup and recovery procedures.


b. The configuration of database server hardware.
c. The implementation of security protocols for database access.
d. The process of defining the structure and organization of database tables and relationships.

The correct answer is: The process of defining the structure and organization of database tables and relationships.

Question 16
Not answered

Marked out of 1.00

What is the primary role of metadata in a database schema?

a. To describe and manage the structure and organization of the data.


b. To handle transactions and query execution.
c. To store the actual data in tables.
d. To provide encryption for sensitive data.

The correct answer is: To describe and manage the structure and organization of the data.

Question 17
Not answered

Marked out of 1.00

Which feature of the WiredTiger storage engine contributes to efficient concurrency control?

a. File-level locking.
b. Page-level locking.
c. Document-level locking.
d. Table-level locking.

The correct answer is: Document-level locking.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 6/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 18

Not answered

Marked out of 1.00

How does a compound index affect query performance?

a. It automatically handles data compression.


b. It eliminates the need for single-field indexes.
c. It decreases performance for queries on a single field.
d. It improves performance for queries that involve multiple fields.

The correct answer is: It improves performance for queries that involve multiple fields.

Question 19
Not answered

Marked out of 1.00

What is the primary advantage of using compound indexes in queries?

a. They allow for faster write operations.


b. They reduce the amount of disk space used for indexing.
c. They provide a faster query execution by covering multiple query fields.
d. They support full-text search capabilities.

The correct answer is: They provide a faster query execution by covering multiple query fields.

Question 20
Not answered

Marked out of 1.00

How does the read ratio to write ratio affect database performance tuning?

a. It impacts the choice of data encryption methods.


b. It helps determine the balance between read and write optimizations.
c. It indicates the need for additional disk storage.
d. It affects the number of indexes required for performance.

The correct answer is: It helps determine the balance between read and write optimizations.

◄ Unit 2 Practice Quiz

Jump to...

Unit 4 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320245&cmid=31263 7/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 3 Practice Quiz

Started on Friday, 25 October 2024, 12:22 AM


State Finished
Completed on Friday, 25 October 2024, 12:22 AM
Time taken 12 secs
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

What is a key consideration when tuning the WiredTiger storage engine?

a. Changing the data replication strategy.


b. Adjusting the cache size and compression settings.
c. Increasing the number of collections.
d. Modifying the index structure.

The correct answer is: Adjusting the cache size and compression settings.

Question 2

Not answered

Marked out of 1.00

Which of the following indexes is best for improving performance in queries that involve sorting and filtering on a single column?

a. Geospatial index
b. Compound index
c. Single-field index
d. Multi-key index

The correct answer is: Single-field index

Question 3
Not answered

Marked out of 1.00

What does the term "schema" refer to in a database context?

a. The process of backing up and restoring data.


b. The set of permissions and security settings for database access.
c. The structure and organization of data within the database.
d. The physical storage location of database files.

The correct answer is: The structure and organization of data within the database.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 1/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

Which of the following is a benefit of using the MMAP storage engine?

a. It supports document-level locking for better concurrency control.


b. It uses an in-memory data structure for faster read and write operations.
c. It provides efficient access to data by mapping files into memory.
d. It offers advanced compression techniques for data storage.

The correct answer is: It provides efficient access to data by mapping files into memory.

Question 5
Not answered

Marked out of 1.00

What does the term "metadata" in database systems refer to?

a. The configuration settings of the database server.


b. The actual data stored in tables.
c. Data that describes other data within the database.
d. The physical storage structure of the database.

The correct answer is: Data that describes other data within the database.

Question 6
Not answered

Marked out of 1.00

How would you model a onetomany (1:N) relationship where the "one" side is the parent and the "many" side are child documents?

a. Embed child documents within the parent document

b. Use separate databases for each side of the relationship

c. Combine both in a single database table

d. Store child documents in a separate collection and use references

Your answer is incorrect.

The correct answer is: Embed child documents within the parent document

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 2/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

How can the performance of the WiredTiger storage engine be tuned?

a. By changing the size of memory-mapped files.


b. By adjusting cache size and compression settings.
c. By increasing the number of replica sets.
d. By modifying the number of indexes.

The correct answer is: By adjusting cache size and compression settings.

Question 8
Not answered

Marked out of 1.00

What is an example of a situation where a multi-key index would be beneficial?

a. When enforcing unique constraints on a field.


b. When sorting documents based on a single field.
c. When querying a collection for specific text in a field.
d. When querying a collection of documents with embedded arrays.

The correct answer is: When querying a collection of documents with embedded arrays.

Question 9
Not answered

Marked out of 1.00

Which of the following best describes a foreign key constraint in a database?

a. It enforces a limit on the number of records in a table.


b. It maintains referential integrity by linking a field in one table to a primary key in another table.
c. It ensures that a field in a table cannot have duplicate values.
d. It provides encryption for the data in a field.

The correct answer is: It maintains referential integrity by linking a field in one table to a primary key in another table.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 3/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

What is the role of an associative table in a many-to-many (N:M) relationship?

a. To improve the performance of single-table queries.


b. To store the relationships between records in the two tables.
c. To replace the need for foreign keys in the two tables.
d. To store a summary of the records in the two related tables.

The correct answer is: To store the relationships between records in the two tables.

Question 11
Not answered

Marked out of 1.00

In MongoDB, how does the performance impact of a single-field index compare to a compound index?

a. Single-field indexes are generally faster for queries on a single field, while compound indexes are better for queries involving
multiple fields.
b. Compound indexes are faster for single-field queries compared to single-field indexes.
c. Single-field indexes are more efficient than compound indexes for all types of queries.
d. Single-field indexes are only useful for text searches, while compound indexes cannot be used for text searches.

The correct answer is: Single-field indexes are generally faster for queries on a single field, while compound indexes are better for queries
involving multiple fields.

Question 12

Not answered

Marked out of 1.00

What is the purpose of an index in a database system?

a. To ensure data integrity by enforcing constraints.


b. To speed up query performance by providing a fast lookup mechanism.
c. To handle large volumes of data by partitioning tables.
d. To manage transactions and concurrency control.

The correct answer is: To speed up query performance by providing a fast lookup mechanism.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 4/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

How does the use of multi-key indexes affect query performance?

a. It reduces the performance of all types of queries.


b. It has no impact on query performance.
c. It improves performance for queries that filter on array fields.
d. It optimizes write operations by reducing index size.

The correct answer is: It improves performance for queries that filter on array fields.

Question 14
Not answered

Marked out of 1.00

How can you improve query performance for searches involving array fields?

a. By creating a compound index.


b. By using a multi-key index.
c. By applying a single-field index.
d. By implementing a text index.

The correct answer is: By using a multi-key index.

Question 15
Not answered

Marked out of 1.00

How does the use of memory-mapped files improve performance in a database system?

a. By automatically optimizing query execution plans.


b. By simplifying the management of large volumes of data.
c. By providing a larger cache for frequently accessed data.
d. By reducing the overhead of traditional file I/O operations through direct memory access.

The correct answer is: By reducing the overhead of traditional file I/O operations through direct memory access.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 5/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

Which feature of the WiredTiger storage engine contributes to efficient concurrency control?

a. Table-level locking.
b. File-level locking.
c. Page-level locking.
d. Document-level locking.

The correct answer is: Document-level locking.

Question 17
Not answered

Marked out of 1.00

Which MongoDB storage engine is known for its support of document-level locking?

a. RocksDB
b. MMAP
c. In-Memory
d. WiredTiger

The correct answer is: WiredTiger

Question 18
Not answered

Marked out of 1.00

Which indexing strategy is best suited for queries that filter and sort on multiple fields?

a. Geospatial index
b. Multi-key index
c. Compound index
d. Single-field index

The correct answer is: Compound index

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 6/7
10/25/24, 12:21 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

What is the impact of a high read ratio to write ratio on database performance?

a. It suggests that the database may suffer from write contention issues.
b. It suggests that the database is optimized for write-heavy workloads.
c. It indicates that the database has insufficient indexing.
d. It indicates that the database is optimized for read-heavy workloads.

The correct answer is: It indicates that the database is optimized for read-heavy workloads.

Question 20
Not answered

Marked out of 1.00

What is the main advantage of using a single-field index?

a. It speeds up queries that filter or sort based on a single field.


b. It provides encryption for indexed field data.
c. It allows for efficient indexing of array fields.
d. It supports complex queries involving multiple fields.

The correct answer is: It speeds up queries that filter or sort based on a single field.

◄ Unit 2 Practice Quiz

Jump to...

Unit 4 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=320244&cmid=31263 7/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

My courses / 19AI512C / 19AI512-NoSQL DATABASE DESIGN / Unit 3 Practice Quiz

Started on Monday, 21 October 2024, 11:12 AM


State Finished
Completed on Friday, 25 October 2024, 12:21 AM
Time taken 3 days 13 hours
Grade 0.00 out of 20.00 (0%)

Question 1

Not answered

Marked out of 1.00

What type of index should be used to improve performance for queries involving sorting on multiple fields?

a. Single-field index
b. Multi-key index
c. Geospatial index
d. Compound index

The correct answer is: Compound index

Question 2

Not answered

Marked out of 1.00

What is the primary advantage of using a compound index over multiple single-field indexes?

a. A compound index provides better encryption for indexed fields.


b. A compound index reduces the need for indexing individual fields.
c. A compound index is simpler to manage than multiple single-field indexes.
d. A compound index can improve query performance by covering multiple query fields in a single index.

The correct answer is: A compound index can improve query performance by covering multiple query fields in a single index.

Question 3
Not answered

Marked out of 1.00

How does a document-level lock in the WiredTiger storage engine affect concurrency?

a. It prevents any concurrent access to the same document.


b. It allows concurrent access only for read operations.
c. It is less efficient than file-level locking.
d. It allows multiple operations to access different documents concurrently.

The correct answer is: It allows multiple operations to access different documents concurrently.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 1/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 4

Not answered

Marked out of 1.00

What type of index would you use to optimize a query for searching and sorting text fields?

a. Text index
b. Multi-key index
c. Compound index
d. Single-field index

The correct answer is: Text index

Question 5
Not answered

Marked out of 1.00

How does a foreign key constraint ensure referential integrity in a database?

a. By ensuring that values in the foreign key field of one table correspond to values in the primary key field of another table.
b. By preventing duplicate values in the foreign key field.
c. By automatically updating related records when a referenced record is updated.
d. By allowing null values in the foreign key field.

The correct answer is: By ensuring that values in the foreign key field of one table correspond to values in the primary key field of another
table.

Question 6

Not answered

Marked out of 1.00

What type of index is used to improve the performance of queries that involve multiple fields?

a. Multi-key index
b. Text index
c. Single-field index
d. Compound index

The correct answer is: Compound index

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 2/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 7

Not answered

Marked out of 1.00

What role does metadata play in a database schema?

a. It handles transaction management.


b. It provides information about the structure and organization of the data.
c. It manages data encryption and security.
d. It stores the actual content of the database tables.

The correct answer is: It provides information about the structure and organization of the data.

Question 8
Not answered

Marked out of 1.00

What is the main advantage of using a memory-mapped file system in a database?

a. It automatically balances data across multiple storage devices.


b. It provides better encryption for stored data.
c. It simplifies database schema design.
d. It allows for faster access to data by mapping files directly into memory.

The correct answer is: It allows for faster access to data by mapping files directly into memory.

Question 9
Not answered

Marked out of 1.00

What does a multi-key index allow a database to do?

a. Index nested objects within documents.


b. Create unique constraints across multiple fields.
c. Improve performance for queries involving multiple collections.
d. Index documents that contain arrays and perform efficient queries on them.

The correct answer is: Index documents that contain arrays and perform efficient queries on them.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 3/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 10

Not answered

Marked out of 1.00

How does document-level locking in WiredTiger improve concurrency?

a. By restricting access to a document to a single operation at a time.


b. By providing a more efficient way to manage file locks.
c. By allowing multiple operations to modify different documents concurrently.
d. By reducing the need for index maintenance.

The correct answer is: By allowing multiple operations to modify different documents concurrently.

Question 11
Not answered

Marked out of 1.00

How does a high read ratio to write ratio affect database performance?

a. It suggests that write operations are the bottleneck in performance.


b. It implies a need for better data encryption practices.
c. It indicates that data replication strategies need to be improved.
d. It typically indicates a need to optimize read operations and indexing.

The correct answer is: It typically indicates a need to optimize read operations and indexing.

Question 12
Not answered

Marked out of 1.00

Which indexing method would be best for optimizing a query that searches for specific text in a field?

a. Single-field index
b. Compound index
c. Text index
d. Multi-key index

The correct answer is: Text index

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 4/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 13

Not answered

Marked out of 1.00

Which storage engine in MongoDB is known for its use of memory-mapped files?

a. WiredTiger
b. RocksDB
c. In-Memory
d. MMAP

The correct answer is: MMAP

Question 14
Not answered

Marked out of 1.00

In which scenario is a multi-key index particularly useful?

a. When enforcing uniqueness across fields.


b. When searching for specific text in a field.
c. When dealing with documents that contain arrays.
d. When optimizing queries that sort on multiple fields.

The correct answer is: When dealing with documents that contain arrays.

Question 15
Not answered

Marked out of 1.00

What does a compound index allow you to do in terms of query optimization?

a. Optimize queries that use multiple fields for searching and sorting.
b. Provide encryption for indexed data.
c. Speed up queries on a single field.
d. Improve the performance of full-text search.

The correct answer is: Optimize queries that use multiple fields for searching and sorting.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 5/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 16

Not answered

Marked out of 1.00

How can a high read-to-write ratio influence database schema design?

a. It suggests that the database should use fewer indexes.


b. It indicates a need for increased write capacity.
c. It implies that data encryption should be enhanced.
d. It may necessitate optimization for read-heavy operations and indexing strategies.

The correct answer is: It may necessitate optimization for read-heavy operations and indexing strategies.

Question 17
Not answered

Marked out of 1.00

How does a compound index affect query performance?

a. It automatically handles data compression.


b. It improves performance for queries that involve multiple fields.
c. It eliminates the need for single-field indexes.
d. It decreases performance for queries on a single field.

The correct answer is: It improves performance for queries that involve multiple fields.

Question 18
Not answered

Marked out of 1.00

What does the term "metadata schema observations" refer to?

a. The analysis of how schema changes affect metadata storage.


b. The performance impact of schema design on metadata operations.
c. The size of metadata compared to actual data storage.
d. The collection of metadata about schema objects and their relationships.

The correct answer is: The collection of metadata about schema objects and their relationships.

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 6/7
10/25/24, 12:20 AM Unit 3 Practice Quiz: Attempt review | SEC

Question 19

Not answered

Marked out of 1.00

In a one to one (1:1) relationship, how is data typically stored in MongoDB?

a. In multiple databases

b. In separate documents within the same collection

c. In separate collections, linked by a foreign key

d. All related data in a single document

Your answer is incorrect.

The correct answer is: All related data in a single document

Question 20

Not answered

Marked out of 1.00

Which feature of the WiredTiger storage engine is aimed at improving write performance?

a. In-memory indexing.
b. Document-level concurrency control.
c. Page-level locking.
d. File-level locking.

The correct answer is: Document-level concurrency control.

◄ Unit 2 Practice Quiz

Jump to...

Unit 4 Practice Quiz ►

https://lms2.ai.saveetha.in/mod/quiz/review.php?attempt=312961&cmid=31263 7/7

You might also like