Document storage with Amazon DocumentDB

Introduction

In this course, you have been building a restaurant-rating application. You used Amazon DynamoDB to build the core restaurant-ratings service to allow users to rate restaurants. Then you sped up your application by adding caching to key workflows by using Amazon ElastiCache. You then used Amazon Neptune to add fraud detection by analyzing reviews to detect bot traffic.

In this fourth lesson, you add marketing pages for restaurants. Restaurants can customize the look of their page on their site to help promote their offerings. They also can display their menus, promote positive reviews, and post photos. To handle this application, you’ll use Amazon DocumentDB (with MongoDB compatibility).

This lesson teaches you how to use a fully managed document database in an application. First, you learn why you would want to use a document database such as Amazon DocumentDB. Then you walk through the steps to create an Amazon DocumentDB database, design your data model, and use the database in your application. At the end of this lesson, you should feel confident in your ability to use Amazon DocumentDB in your application. For additional information about Amazon DocumentDB, see the Amazon DocumentDB Developer Guide.

Time to complete: 3045 minutes

Purpose-built Databases - DocumentDB (24:04)
Why use Amazon DocumentDB?

Amazon DocumentDB is a fully managed document database from AWS. A document database is a type of NoSQL database that allows you to store and query rich documents in your application. A document database works well for the following use cases:

  • Content management systems: When storing data for displaying rich content pages, you often have heterogeneous data. It can include content, images, and testimonials. Storing this data in a rigid relational database can remove flexibility. By using a document database, you can move quickly and provide a great experience for your users.
  • Profile management: When storing user profiles in your application, you might have a wide range of settings, preferences, and additional data to store with your user. With a document database such as Amazon DocumentDB, you can keep this data together while keeping data access fast.
  • Web and mobile applications: Modern web and mobile applications demand fast data access at high scale. The rise of global applications means you can have millions of users per second at any time of day. Amazon DocumentDB provides high performance and easy scaling to handle your high-volume applications.

With Amazon DocumentDB, you get a fully managed document database experience. This means you don't need to focus on instance failover, database backups and recovery, or software upgrades. You can focus on building your application and innovating for your customers.

Finally, Amazon DocumentDB has API compatibility with MongoDB. This means you can use popular open-source libraries to interact with Amazon DocumentDB, or you can migrate existing databases to Amazon DocumentDB with minimal hassle.

Lesson contents

In this lesson, you learn how to build a service by using Amazon DocumentDB as your data storage. This lesson has five steps.

In this lesson, you learned how to create and use an Amazon DocumentDB database in your application. First, you created an Amazon DocumentDB database and configured network access so that you could connect to the database. Then you learned the terminology of document databases and loaded your database with example data. Finally, you saw how to use a document database in your application, including how to query your documents and how to update existing documents. You can use these patterns when building applications with Amazon DocumentDB.