Coding Exercises: Advanced MongoDB

Coding Exercises: Advanced MongoDB

43mAdvanced2022-11-10

Authors

John Cokos

John Cokos

Director of Curriculum at Code Fellows

Course details

MongoDB is one of the most popular nonrelational databases in the world. If you’re looking to build out your skill set, your best move may be to dive right in. In this approachable, hands-on course, instructor John Cokos leads intermediate to advanced users through a series of practical coding challenges to help you get the most out of MongoDB. Learn how to query or find using aggregation pipelines to process documents, sort and group records, shape your output, and create calculated fields. Along the way, you’ll build out your toolbox with the necessary skills to work with multiple documents and relationships.

Skills covered

MongoDBAdvancedDatabase DevelopmentDatabase ManagementOpen SourceSoftware Development

Concepts

Introduction

  • Introduction, goals, and prerequisites
  • Tooling - mongosh and Compass install, configure, basic use

CRUD - Query or Find with Pipelines

  • Find - Using aggregation pipeline to process documents
  • Find - Aggregation with $group and $sort
  • Find - Use $project to shape your output
  • Find - Create calculated fields
  • Aggregate - Custom logic with an accumulator
  • Aggregate - Custom logic with a function

Working with Multiple Documents and Relationships

  • Find - Looking up a referenced document, nesting
  • Find - Referenced data sets, iterating with a cursor
  • Find - $lookup() to join collections
  • Using $mergeObjects

Conclusion

  • Next steps
40,000 Toman