V School | Better Humans, Better Outcomes

Mongoose Schema Basics

Understanding Schemas A "Schema" can be a tough thing to understand at first, but in reality it's pretty straightforward. A Schema for a database is akin to a "Class" in Object-Oriented Programming. Where a class is like a blueprint for creating objects in a program, a Schema is a blueprint

Mongoose CRUD (Create, Read, Update, Delete)

We've covered the basics of making queries in the MongoDB Shell, but since we'll mostly be writing our queries in our server's JavaScript code using Mongoose, it makes sense to understand how Mongoose does queries. We'll be covering basic CRUD (Create, Read, Update, Delete) operations. With Mongoose, you can perform

MongoDB Overview

A database is simply a storage mechanism for information. In the same way a warehouse stores physical inventory in rows, on shelves, in boxes, etc., a database stores data in it’s own organized way. The two types of database structures are relational (SQL) and non-relational (NoSQL). Relational vs. Non-Relational

Bounty Hunting with Mongoose

Boba Fett has asked you to build him an API so he can keep track of his bounties. You have done a satisfactory job up to this point except that every time the server reloads, all the data is wiped. Boba Fett is absolutely not happy about this because it

Intro to Mongoose

Mongoose is a library for connecting to MongoDB and running queries from a Node.js app. Installation is trivial: npm install --save mongoose. Although documents in a MongoDB collection do not have to be homogeneous (they may have different schemas), Mongoose enforces document schemas to make the collection more uniform

V School | Better Humans, Better Outcomes © 2026