Adding Sample Data
Understand the process of loading MongoDB sample data into a cluster and explore the sample_mflix dataset which includes movie details. This lesson helps you get started with test data to use in your MERN stack project.
We'll cover the following...
One thing that’s great about MongoDB is when we want to use test data to try things out, we don’t have to generate it ourselves. MongoDB provides a lot of sample data for us.
Loading sample data into our cluster
In the “Database Deployments” section of the MongoDB cluster, click the three dots ("…") and select “Load Sample Dataset,” as shown below. This loads a sample dataset into the cluster.
Displaying sample data
To see the sample data, click “Browse Collections.” This presents a list of the sample databases, as shown below:
In our application, we’ll use the sample_mflix dataset, which contains movie data.
For example, we have the Blacksmith Scene movie in the first listing. We have the movie’s runtime, title, plot, year, etc. We’ll use this data in our application.