Posts

8. students

  db.students.insertMany([ { "studentID": 1, "name": "Student1", "age": 22, "city": "New York", "tags": ["tag1", "tag2", "tag3"] }, { "studentID": 2, "name": "Student2", "age": 25, "city": "San Francisco", "tags": ["tag1", "tag2", "tag3"] }, { "studentID": 3, "name": "Student3", "age": 30, "city": "Los Angeles", "tags": ["tag1", "tag2", "tag3"] }, { "studentID": 4, "name": "Student4", "age": 35, "city": "Chicago", "tags": ["tag1", "tag2", "tag3"] }, { "studentID": 5, "name": "Student5", "age": 40, "city": "New York", "tags":...

7. listings

db.listingsAndReviews.insertMany([   {     listing_url: "http://www.example.com/listing/123456",     name: "Beautiful Apartment",     address: {       street: "123 Main Street",       suburb: "Central",       city: "Metropolis",       country: "Wonderland"     },     host: {       name: "Alice",       picture_url: "http://www.example.com/images/host/host123.jpg"     }   },   {     listing_url: "http://www.example.com/listing/654321",     name: "Cozy Cottage",     address: {       street: "456 Another St",       suburb: "North",       city: "Smallville",       country: "Wonderland"     },     host: {       name: "Bob",       picture_url: ""     }   },   {    ...

6. Aggregation Pipeline and its operations

 use restaurantDB db.restaurants.insertMany([   {     name: "Biryani House",     cuisine: "Indian",     location: "Jayanagar",     reviews: [       { user: "Aarav", rating: 5, comment: "Amazing biryani!" },       { user: "Bhavana", rating: 4, comment: "Great place!" }     ]   },   {     name: "Burger Joint",     cuisine: "American",     location: "Koramangala",     reviews: [       { user: "Chirag", rating: 3, comment: "Average burger" },       { user: "Devika", rating: 4, comment: "Good value" }     ]   },   {     name: "Pasta House",     cuisine: "Italian",     location: "Rajajinagar",     reviews: [       { user: "Esha", rating: 5, comment: "Delicious pasta!" },       { user: "Farhan", rating: 4, comment: "Nice ambiance" } ...