MongoDB DBA Self-Learning Path (Quizzes Section Q&A)

Ace your homework & exams now with Quizwiz!

Lesson 1: Introduction to MongoDB 2)Jenni works at an e-commerce start-up that uses MongoDB for its customer data management, product catalog and payment processing. Her startup now wants to add personalized recommendations for customers using real-time analytics. Jenni and her team will need to move data to a separate analytics database to handle this new use case. A. True B. False

B. False MongoDB is a general-purpose database that can handle most types of workloads, including real-time analytics.

Lesson 2: The MonogDB Document Model 3)Use the following documents labeled Document A and Document B to answer this question. Elena's company has been storing customer data in records that are structured like Document A. Her company wants to add a new field to their customer records so that they are structured like Document B. Before inserting records like Document B, Elena and her team must update all older records to include the new field. Document A { "username": "vreddy", "name": "Vasanti Reddy", "email": "[email protected]", "location": { "city": "Delhi", "country": "India" } } Document B { "username": "avasa", "name": "Asad Vasa", "email": "[email protected]", "social_media": { "Twitter": "avasa", "Instagram": "Asad101", "LinkedIn": "AsadVasa" }, "location": { "city": "Los Angeles", "country": "United States" } } A. True B. False

B. False MongoDB has a flexible schema model, which means that documents in the same collection are not required to share a common structure of fields and value types by default.

Lesson 1: Introduction to MongoDB 1) What is the relationship between the MongoDB database and MongoDB Atlas? (Select one.) · a. The MongoDB database is the locally deployed version of MongoDB Atlas.. The MongoDB database can be deployed in the cloud via MongoDB Atlas, as well as locally. How might the MongoDB database and MongoDB Atlas be related? · b. The MongoDB database is a core element of MongoDB Atlas, which is a multi-cloud developer data platform. · c. The MongoDB database is the free version of MongoDB Atlas.

B. The MongoDB database is a core element of MongoDB Atlas, which is a multi-cloud developer data platform. The MongoDB database is the foundation of MongoDB Atlas. The additional functionality that Atlas offers—such as full-text search, data visualization, data lake storage, and mobile device sync—are built on top of data stored in cloud-hosted MongoDB database deployments.

Lesson 1: Introduction to MongoDB 3)What is the basic unit of data in MongoDB? (Select one.) A. Collection A collection is a grouping of the basic units of data in MongoDB. B. Database A database is a grouping of one or more collections in MongoDB. It is not the basic unit of data. C. Document A document is the basic unit of data in MongoDB. For this reason, MongoDB is classified as a document database. D. Row A row is a basic unit of data in a relational database. MongoDB structures data differently than relational databases.

C. Document A document is the basic unit of data in MongoDB. For this reason, MongoDB is classified as a document database.

MongoDB Data Modeling Intro - Lesson 3: Modeling Data Relationships A legacy bank database has been ported to MongoDB, resulting in a set of collections that were mapped to their original tables. You're tasked with redesigning the "accounts" collection of the "banking" database to make the information clearer. The bank would like you to keep the customers' contact information and account information separate. The following is a sample document in the "accounts" collection: { "account_id": "MDB653115886", "account_holder": "Herminia Mckinney", "account_type": "savings", "balance": 6617.34, "street_num": 123, "street": "Main St", "city": "Tulsa", "state": "OK", "zip": 74008, "country": "USA", "home_phone": 1234567890, "cell_phone": 1111111111, "transfers": [ ... ], }

Which of the following actions can be made to improve this schema? Consider the following requirements: • Preserve the one-to-one relationship among all the fields. • Keep the contact and account information separate. • Store data together that is accessed together. Hint Remember that you can embed subdocuments and create separate collections. A. Create two collections: one for accounts and one for customer_info. B. Embed the phone numbers as a subdocument. C. Create two collections that have no overlapping fields. D. Keep the current schema as is.

Lesson 2: The MonogDB Document Model 2) Which of the following statements are true about the _id field in MongoDB? (Select all that apply.) • A. The user must specify the _id field for each inserted document. • B. The _id field is required for each document. • C. The _id field must be unique. • D. The _id field is automatically included and populated with an ObjectId if the _id field is omitted in an inserted document.

• B. The _id field is required for each document. • C. The _id field must be unique. • D. The _id field is automatically included and populated with an ObjectId if the _id field is omitted in an inserted document.

Lesson 2: The MonogDB Document Model 1) Which of the following are data types that are supported by MongoDB by using BSON? (Select all that apply.) o A. 32-bit integer o B. Object o C. Array o D. ObjectId o E. _id o F. All of the above.

A, B, C, D are all correct o A. 32-bit integer o B. Object o C. Array o D. ObjectId E. _id is incorrect. _id is a required field in every MongoDB document, but it's not a data type. If an inserted document does not include an _id field, MongoDB will automatically create the _id field and populate it with a value of type ObjectId.

MongoDB Data Modeling Intro - Lesson 1: Introduction to Data Modeling Which of the following are benefits of a proper data model? (Select all that apply.) A. A proper data model makes it easier to manage your data. B. A proper data model makes queries more efficient. C. A proper data model uses less memory and CPU. D. A proper data model reduces costs.

A. A proper data model makes it easier to manage your data. B. A proper data model makes queries more efficient. C. A proper data model uses less memory and CPU. D. A proper data model reduces costs.

MongoDB Data Modeling Intro - Lesson 1: Introduction to Data Modeling Which of the following statements is/are true about data modeling? (Select all that apply.) A. Data modeling is the process of defining how data is stored. B. Data modeling is the process of defining the relationships that exist among different entities in your data. C. Data modeling is the process of collecting data.

A. Data modeling is the process of defining how data is stored. B. Data modeling is the process of defining the relationships that exist among different entities in your data.

MongoDB Data Modeling Intro - Lesson 2: Type of Data Relationships What is the type of relationship shown in the following document? { "_id": ObjectId("00000001"), "name": "Marnie Dupree", "grade": "Freshman", "studentId": 123456, "email": "[email protected]" } A. One-to-one relationship B. One-to-many relationship C. Many-to-many relationship

A. One-to-one relationship There is a one-to-one relationship in this document. This is a document for a single student that contains her unique identifying fields.

MongoDB Data Modeling Intro - Lesson 2: Type of Data Relationships Which of the following are common types of relationships that are found in every database? (Select all that apply.) A. One-to-one relationship B. One-to-many relationship C. Many-to-many relationship D. One-to-zillions relationship

A. One-to-one relationship B. One-to-many relationship C. Many-to-many relationship

MongoDB Data Modeling Intro - Lesson 1: Introduction to Data Modeling Which of the following is a benefit of the document model? A. The document model does not enforce any document structure by default. This means that documents even in the same collection can have different structures. B. The document model makes having a schema useless. C. The document model supports only simple relationships among data to make data wrangling easier.

A. The document model does not enforce any document structure by default. This means that documents even in the same collection can have different structures.


Related study sets

Pharmacology Chapter 51 Diuretic Agents

View Set

Chapter 18 - Gastrointestinal and Urologic Emergencies

View Set

Nutrition: Implement and Take Action; Evaluate

View Set

Chapter 17: Investments & business opportunity brokerage

View Set

PassPoint - Medication and IV Administration

View Set

ARCH 3323 - Test 2 - Chapter 4 Short Answer

View Set