MongoDB - The Complete Developer's Guide

Master MongoDB Development for Web & Mobile Apps. CRUD Operations, Indexes, Aggregation Framework - All about MongoDB!

Start
  1. Courses
  2. MongoDB - The Complete Developer's Guide

MongoDB is one of the most important NoSQL databases you can work with these days. It's extremely popular and MongoDB developers are in high demand.

No matter if you're building web applications, mobile applications or any other kind of application or if you're a data scientist - you'll need to work with data. Storing data, querying it efficiently and minimizing complexities whilst optimizing performance are crucial tasks.

MongoDB makes working with data simple - it's built on a philosophy that prioritizes performance and efficiency.

In this course, you'll learn all about MongoDB from scratch. No prior MongoDB or database experience is required!

In detail, you'll learn:

  • ... how to install and use MongoDB locally and in the cloud (MongoDB Atlas)
  • ... how to perform CRUD (Create, Read, Update, Delete) operations on MongoDB databases
  • ... how to filter for data efficiently
  • ... how to work with both the Mongo Shell and drivers (e.g. Node.js driver)
  • ... how to increase performance by using indexes (and how to use the right indexes!)
  • ... how to use the amazing "Aggregation Framework" that's built into MongoDB
  • ... what replica sets and sharding are
  • ... how to use MongoDB Atlas - the cloud solution offered by MongoDB
  • ... how to use the serverless platform (Stitch) offered by MongoDB
  • ... and much more!

This course is a hands-on course - you'll learn by writing code/ commands. We'll work on a wide variety of example data and use-cases and by the end of the course, you'll have all the knowledge you need to work with MongoDB in your next project!

This course is for you, no matter which programming language you plan on using, you'll learn a uniform way of interacting with MongoDB that can be easily applied to any language.

This course is for you:

  • ... if you're brand-new to MongoDB and databases in general
  • ... if you got some basic database or even MongoDB experience - in this course, there are different entry points you can choose from!
  • ... if you are a web or mobile app (or desktop app) developer who considers using MongoDB
  • ... if you're working in a team that considers using MongoDB (or already does use it)
  • ... if you are primarily using SQL-based databases so far and you want to explore the most popular NoSQL alternative

This course is NOT for you:

  • ... if you're looking for a guide on administrating MongoDB servers => This course focuses on the commands/ queries you write, it's NOT an administration course. I will show (in detail) how to deploy a ready-to-use cloud MongoDB solution that follows best practices though.

Section: Getting Started

1. Introduction (2:04) Preview
2. What is MongoDB? (5:36) Preview
3. The Key MongoDB Characteristics (and how they differ from SQL Databases) (2:55) Preview
4. Join our Online Learning Community (1:00) Preview
5. Understanding the MongoDB Ecosystem (4:19) Preview
6. Installing MongoDB (10:35) Preview
7. Time To Get Started! (5:37) Preview
8. Shell vs Drivers (3:29) Preview
9. MongoDB + Clients: The Big Picture (2:58) Preview
10. Course Outline (4:38) Preview
11. How To Get The Most Out Of The Course (2:30) Preview

Section: Understanding the Basics & CRUD Operations

12. Module Introduction (1:30)
13. Understanding Databases, Collections & Documents (3:47)
14. The Shell & MongoDB Drivers for Different Languages (2:40)
15. Creating Databases & Collections (3:16)
16. Understanding JSON Data (4:05)
17. Comparing JSON & BSON (5:23)
18. Create, Read, Update, Delete (CRUD) & MongoDB (5:37)
19. Finding, Inserting, Deleting & Updating Elements (7:47)
20. Understanding "insertMany()" (1:48)
21. Diving Deeper Into Finding Data (3:55)
22. "update" vs "updateMany()" (4:41)
23. Understanding "find()" & the Cursor Object (7:30)
24. Understanding Projection (3:38)
25. Embedded Documents & Arrays - The Theory (1:56)
26. Working with Embedded Documents (2:28)
27. Working with Arrays (1:43)
28. Accessing Structured Data (4:39)
29. Assignment - The Basics & CRUD Operations (Problem) (2:37)
30. Assignment - The Basics & CRUD Operations (Solution) (6:57)
31. Wrap Up (2:47)
32. Useful Resources & Links (1:00)

Section: Schemas & Relations: How to Structure Documents

33. Module Introduction (2:12)
34. Why Do We Use Schemas? (3:57)
35. Structuring Documents (7:43)
36. Data Types - An Overview (6:23)
37. Data Types in Action (12:15)
38. How to Derive your Data Structure - Requirements (5:07)
39. Understanding Relations (2:58)
40. One To One Relations - Embedded (6:20)
41. One To One - Using References (4:54)
42. One To Many - Embedded (5:07)
43. One To Many - Using References (4:04)
44. Many To Many - Embedded (7:16)
45. Many To Many - Using References (5:25)
46. Summarizing Relations (2:18)
47. Using "lookUp()" for Merging Reference Relations (4:35)
48. Planning the Example Exercise (6:56)
49. Implementing the Example Exercise (4:16)
50. Understanding Schema Validation (2:57)
51. Adding Collection Document Validation (9:07)
52. Changing the Validation Action (3:43)
53. Wrap Up (4:08)
54. Useful Resources & Links (1:00)

Section: Exploring The Shell & The Server

55. Module Introduction (1:01)
56. Finding Available Options (2:15)
57. Setting "dbpath" & "logpath" (4:41)
58. Exploring the MongoDB Options (2:00)
59. MongoDB as a Background Service (3:09)
60. Using a Config File (3:02)
61. Shell Options & Help (4:12)
62. Useful Resources & Links (1:00)

Section: Using the MongoDB Compass to Explore Data Visually

63. Module Introduction (0:50)
64. Exploring the MongoDB Compass (5:50)
65. Useful Resources & Links (1:00)

Section: Diving Into Create Operations

66. Module Introduction (1:12)
67. Creating Documents - An Overview (1:47)
68. Understanding "insert()" Methods (6:10)
69. Working with Ordered Inserts (7:47)
70. Understanding the "writeConcern" (5:44)
71. The "writeConcern" in Practice (4:09)
72. What is Atomicity? (2:39)
73. Assignment - Create Operations (Problem) (1:34)
74. Assignment - Create Operations (Solution) (5:23)
75. Importing Data (3:37)
76. Wrap Up (2:38)
77. Useful Resources & Links (1:00)

Section: Read Operations - A Closer Look

78. Module Introduction (1:40)
79. Methods, Filters & Operators (2:54)
80. Operators - An Overview (3:02)
81. Query Selectors & Projection Operators (1:16)
82. Understanding "findOne()" & "find()" (4:32)
83. Working with Comparison Operators (5:20)
84. Querying Embedded Fields & Arrays (4:52)
85. Understanding "$in" and "$nin" (2:37)
86. "$or" and "$nor" (5:31)
87. Understanding the "$and" Operator (5:04)
88. Using "$not" (1:35)
89. Diving Into Element Operators (5:30)
90. Working with "$type" (2:52)
91. Understanding Evaluation Operators - "$regex" (3:23)
92. Understanding Evaluation Operators - "$expr" (9:37)
93. Assignment - Read Operations (Problem) (1:23)
94. Assignment - Read Operations (Solution) (6:34)
95. Diving Deeper Into Querying Arrays (4:09)
96. Using Array Query Selectors - "$size" (2:09)
97. Using Array Query Selectors - "$all" (2:12)
98. Using Array Query Selectors - "$elemMatch" (4:52)
99. Assignment - Array Query Selectors (Problem) (1:11)
100. Assignment - Array Query Selectors (Solution) (4:08)
101. Understanding Cursors (2:47)
102. Applying Cursors (6:02)
103. Sorting Cursor Results (3:09)
104. Skipping & Limiting Cursor Results (3:31)
105. Using Projection to Shape our Results (4:01)
106. Using Projection in Arrays (5:12)
107. Understanding "$slice" (3:05)
108. Useful Resources & Links (1:00)

Section: Update Operations

109. Module Introduction (1:01)
110. Updating Fields with "updateOne()", "updateMany()" and "$set" (7:52)
111. Updating Multiple Fields with "$set" (1:40)
112. Incrementing & Decrementing Values (3:33)
113. Using "$min", "$max" and "$mul" (3:15)
114. Getting Rid of Fields (2:04)
115. Renaming Fields (1:20)
116. Understanding "upsert()" (4:01)
117. Assignment - Update Operations (Problem) (1:28)
118. Assignment - Update Operations (Solution) (4:42)
119. Updating Matched Array Elements (6:56)
120. Updating All Array Elements (6:27)
121. Finding & Updating Specific Fields (5:35)
122. Adding Elements to Arrays (4:46)
123. Removing Elements from Arrays (2:34)
124. Understanding "$addToSet" (1:18)
125. Wrap Up (1:39)
126. Useful Resources & Links (1:00)

Section: Understanding Delete Operations

127. Module Introduction (0:31)
128. Understanding "deleteOne()" & "deleteMany()" (4:08)
129. Deleting All Entries in a Collection (2:00)
130. Useful Resources & Links (1:00)

Section: Working with Indexes

131. Module Introduction (1:19)
132. What Are Indexes & Why Do We Use Them? (4:18)
133. Adding a Single Field Index (8:06)
134. Understanding Index Restrictions (2:51)
135. Creating Compound Indexes (7:14)
136. Using Indexes for Sorting (2:25)
137. Understanding the Default Index (0:59)
138. Configuring Indexes (2:28)
139. Understanding Partial Filters (6:07)
140. Applying the Partial Index (3:37)
141. Understanding the Time-To-Live (TTL) Index (3:55)
142. Query Diagnosis & Query Planning (2:10)
143. Understanding Covered Queries (3:34)
144. How MongoDB Rejects a Plan (7:37)
145. Using Multi-Key Indexes (8:15)
146. Understanding Text Indexes (6:09)
147. Text Indexes & Sorting (2:21)
148. Creating Combined Text Indexes (2:54)
149. Using Text Indexes to Exclude Words (0:54)
150. Setting the Default Language & Using Weights (6:31)
151. Building Indexes (7:40)
152. Wrap Up (2:24)
153. Useful Resources & Links (1:00)

Section: Working with Geospatial Data

154. Module Introduction (0:53)
155. Adding GeoJSON Data (4:51)
156. Running Geo Queries (3:22)
157. Adding a Geospatial Index to Track the Distance (2:52)
158. Adding Additional Locations (3:34)
159. Finding Places Inside a Certain Area (6:22)
160. Finding Out If a User Is Inside a Specific Area (5:27)
161. Finding Places Within a Certain Radius (5:38)
162. Assignment - Geospatial Data (Problem) (2:28)
163. Assignment - Geospatial Data (Solution) (13:39)
164. Wrap Up (1:40)
165. Useful Resources & Links (1:00)

Section: Understanding the Aggregation Framework

166. Module Introduction (1:34)
167. What is the Aggregation Framework? (1:59)
168. Getting Started with the Aggregation Pipeline (1:21)
169. Using the Aggregation Framework (3:12)
170. Understanding the Group Stage (5:56)
171. Diving Deeper Into the Group Stage (3:12)
172. Assignment - Aggregation Framework (Problem) (1:03)
173. Assignment - Aggregation Framework (Solution) (4:01)
174. Working with $project (9:58)
175. Turning the Location Into a geoJSON Object (7:59)
176. Transforming the Birthdate (3:48)
177. Using Shortcuts for Transformations (1:25)
178. Understanding the $isoWeekYear Operator (2:40)
179. $group vs $project (0:55)
180. Pushing Elements Into Newly Created Arrays (4:03)
181. Understanding the $unwind Stage (2:50)
182. Eliminating Duplicate Values (0:50)
183. Using Projection with Arrays (3:03)
184. Getting the Length of an Array (1:11)
185. Using the $filter Operator (4:43)
186. Applying Multiple Operations to our Array (7:30)
187. Understanding $bucket (6:16)
188. Diving Into Additional Stages (7:29)
189. Writing Pipeline Results Into a New Collection (1:47)
190. Working with the $geoNear Stage (5:16)
191. Wrap Up (2:41)
192. Useful Resources & Links (1:00)

Section: Working with Numeric Data

193. Module Introduction (0:54)
194. Number Types - An Overview (6:28)
195. Understanding Programming Language Defaults (3:33)
196. Working with int32 (5:17)
197. Working with int64 (6:32)
198. Doing Maths with Floats int32s & int64s (6:57)
199. What's Wrong with Normal Doubles? (4:20)
200. Working with Decimal 128bit (4:14)
201. Wrap Up (1:40)
202. Useful Resources & Links (1:00)

Section: MongoDB & Security

203. Module Introduction (4:23)
204. Understanding Role Based Access Control (6:47)
205. Roles - Examples (2:13)
206. Creating a User (5:50)
207. Built-In Roles - An Overview (5:39)
208. Assigning Roles to Users & Databases (4:48)
209. Updating & Extending Roles to Other Databases (5:06)
210. Assignment - Security (Problem) (1:31)
211. Assignment - Security (Solution) (6:42)
212. Adding SSL Transport Encryption (10:20)
213. Encryption at REST (1:25)
214. Wrap Up (3:21)
215. Useful Resources & Links (1:00)

Section: Performance, Fault Tolerancy & Deployment

216. Module Introduction (1:52)
217. What Influences Performance? (3:01)
218. Understanding Capped Collectionsv (5:05)
219. What are Replica Sets? (4:36)
220. Understanding Sharding (6:13)
221. Deploying a MongoDB Server (2:25)
222. Using MongoDB Atlas (9:17)
223. Backups & Setting Alerts in MongoDB Atlas (1:27)
224. Connecting to our Cluster (3:36)
225. Wrap Up (1:58)
226. Useful Resources & Links (1:00)

Section: Transactions

227. Module Introduction (1:04)
228. What are Transactions? (2:03)
229. A Typical Usecase (2:17)
230. How Does a Transaction Work? (7:42)
231. Useful Resources & Links (1:00)

Section: From Shell to Driver

232. Module Introduction (2:13)
233. Splitting Work Between the Driver & the Shell (2:06)
234. Preparing our Project (4:49)
235. Installing Visual Studio Code (1:46)
236. Installing the Node.js Driver (4:56)
237. Connecting Node.js & the MongoDB Cluster (6:31)
238. Storing Products in the Database (4:53)
239. Storing the Price as 128bit Decimal (6:10)
240. Fetching Data From the Database (6:23)
241. Creating a More Realistic Setup (11:48)
242. Getting a Single Product (3:20)
243. Editing & Deleting Products (7:28)
244. Implementing Pagination (4:58)
245. Adding an Index (1:27)
246. Signing Users Up (7:03)
247. Adding an Index to Make the Email Unique (1:13)
248. Adding User Sign In (5:18)
249. Wrap Up (1:11)
250. Useful Resources & Links (1:00)

Section: Introducing Stitch

251. Module Introduction (1:42)
252. Stitch & MongoDB Realm (1:00)
253. What is Stitch? (7:22)
254. Preparations (2:04)
255. Start Using Stitch (4:33)
256. Adding Stitch to our App & Initializing It (8:11)
257. Adding Authentication (2:47)
258. Sending Data Access Rules (3:57)
259. Fetching & Converting Data (1:49)
260. Deleting Products (3:02)
261. Finding a Single Product (4:09)
262. Adding Products (3:29)
263. Updating Products (3:46)
264. Switching to User Email & Password Authentication (1:54)
265. Adding User Sign Up & Confirmation (6:32)
266. Adding User Login (3:42)
267. Rules & Real Users (1:48)
268. The Current State of Authentication (1:00)
269. Functions & Triggers (5:01)
270. Wrap Up (0:56)
271. Useful Resources & Links (1:00)

Section: Roundup

272. Course Roundup (3:05)

Course Instructor

Image

Maximilian Schwarzmüller

As a self-taught professional I really know the hard parts and the difficult topics when learning new or improving on already-known languages. This background and experience enable me to focus on the most relevant key concepts and topics. My track record of many 5-star rated courses, more than 1,000,000 students worldwide as well as a successful YouTube channel is the best proof for that.

The most rewarding experience for me is to see how people find new, better jobs, build awesome web applications, work on amazing projects or simply enjoy their hobby with the help of my content. That's why, together with Manuel Lorenz, I founded Academind to offer the best possible learning experience and to share the pleasure of learning with our students.