CHAPTER 8

image

Persistence with MongoDB

When you build web applications, persistence of application data is very important. You can define the data model of your Go applications using structs, in which you can program against the structs for working with application data, but you need persistent storage for your application data.

This chapter shows you how to persist application data into MongoDB, which is a popular NoSQL database.

This chapter covers the following:

  • Introduction to MongoDB
  • The mgo package
  • Working with MongoDB using mgo
  • Persistence with MongoDB

Introduction to MongoDB

MongoDB is a popular NoSQL database that has been widely used for ...

Get Web Development with Go: Building Scalable Web Apps and RESTful Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.