Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Schemas and Relations in MongoDB

via CodeSignal

Overview

Understand how to define schemas, validate data types, and manage various data relationships in MongoDB. This section covers one-to-one, one-to-many, and many-to-many relationships, as well as schema validation.

Syllabus

  • Lesson 1: Data Types in MongoDB
    • Insert Book Document in MongoDB
    • Add ObjectId to Book Document
    • Insert Book with Nested Document and Array
    • Extending Book Document with Numeric Fields
    • Adding Date and Timestamp Fields
  • Lesson 2: One-to-One Relations in MongoDB
    • One-to-One Relationships in MongoDB
    • Refactor Embedded to Referenced One-to-One Relationship
    • Refactor to Use Embedded Documents
    • Designing a MongoDB Schema for an Online Bookstore
  • Lesson 3: One-to-Many Relations in MongoDB
    • One-to-Many Relationship Example
    • Refactor Embedded Documents to Referenced Documents
    • Embedding Comments in MongoDB
  • Lesson 4: Many-to-Many Relations in MongoDB
    • Many-to-Many Relations in MongoDB
    • Refactor Embedded Documents to Referenced Documents
    • Enhance Script with Many-to-Many Relationship
  • Lesson 5: Schema Validation in MongoDB
    • Schema Validation Basics in MongoDB
    • Update Journal Year Field Validation
    • Validating Basic Fields
    • Validating Nested Documents
    • Validating Array Fields
    • Adding Schema Validation to Existing Collection

Reviews

Start your review of Schemas and Relations in MongoDB

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.