Complete the code to insert a denormalized document with embedded address.
db.customers.insertOne({ name: "Alice", address: [1] })Embedding the address as an object allows denormalization by storing related data together.
Complete the code to update the embedded address city field in a denormalized document.
db.customers.updateOne({ name: "Alice" }, { $set: { "address.[1]": "Shelbyville" } })To update the city inside the embedded address, use the key "city" in the dot notation.
Fix the error in the query to find customers with a specific city in their embedded address.
db.customers.find({ "address": [1] })The query must match the embedded document structure, so use an object with the city field.
Fill both blanks to create a query that finds customers with an embedded address city of "Shelbyville".
db.customers.find({ "[1]": "[2]" })Use dot notation "address.city" to query the nested city field and match the value "Shelbyville".
Fill all three blanks to update the embedded address zipcode to "12345" for customer "Alice".
db.customers.updateOne({ name: "[1]" }, { $set: { "address.[2]": "[3]" } })Update the zipcode field inside the embedded address for the customer named "Alice" to "12345".