Introduction to MongoDB in Python

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Data Types in Python; NoSQL Concepts
DataCamp details
  • Chapters: 4
Created byDataCamp
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

SKU: introduction-mongodb-python Category: Tags: , Brand:

Learn to query, filter, insert, update and delete MongoDB documents with PyMongo, then add schema validation and batch writes in Python.

At a glance
Duration3 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0
Add to compare

MongoDB keeps data as documents whose fields can vary between records, unlike the fixed tables of a relational database. That flexibility raises practical questions: how to ask for only the documents you need, how to change or remove many of them at once, and how to keep structure where it matters. Working in Python through PyMongo, you query and filter collections, write and delete records, add validation rules, and batch several writes into one request.

What You Will Achieve

  • Connect Python code to a MongoDB server and browse its databases and collections
  • Narrow a query to exactly the documents you need, then order, cap and count the results
  • Add, change, swap out and remove records in a collection with PyMongo
  • Check incoming documents against a defined structure and send several write operations as a single batch


Program Overview

Connecting to MongoDB and Querying Documents

Sets MongoDB against relational databases, opens a server connection and shapes what each query returns.

  • How a NoSQL document database differs in design
  • Server connections and retrieval with .find() and .find_one()
  • Query operators for lists, field existence and and/or logic
  • Sorting, limiting and counting matching documents

Inserting, Updating, and Deleting Records

Works through each way of writing to a collection, one document or many at a time.

  • Single and multiple inserts
  • Updating one or many documents
  • Replacing a whole document
  • Single and multiple deletions

Enforcing Schema and Combining Operations

Adds structure to flexible documents and groups several writes into one request.

  • Schema validation with pydantic
  • MongoDB’s built-in schema validation
  • Type checks on documents
  • Ordered batches and error handling with bulk_write()

Certificate Awarded (Paid)


Job Outlook

The skills apply wherever Python code works with a MongoDB database, such as data engineering pipelines and the data applications that teams build and maintain.


Our take

Good for: Python programmers who want hands-on practice running MongoDB queries, writes and validation through PyMongo in short interactive exercises.

Keep in mind: Although labeled intermediate, the course is pitched at an advanced level and expects solid groundwork before you start.

Bottom line: A focused PyMongo workout on reading, writing and validating MongoDB documents that ends with batched writes through bulk_write().

Frequently Asked Questions

Which Python library does the course use for MongoDB?

Every exercise runs through PyMongo, the official Python driver for MongoDB. You use it to connect to a server, run queries and filters, and carry out inserts, updates, deletions and bulk writes.

How does the course handle MongoDB's flexible schema?

The final chapter shows two ways to add structure when it matters: defining models with pydantic and turning on MongoDB's built-in schema validation. A lesson on checking types sits between them, before the course moves on to combining operations.

How is MongoDB set against relational databases?

The opening chapter introduces MongoDB's key features as a NoSQL document database and contrasts its flexible document model with the fixed table structure of relational databases, before you connect to a server and retrieve your first documents.

What does bulk_write() add to the course?

It closes the course by grouping several write operations into one request. The lesson covers the performance gain of batching and how ordered execution and error handling keep the batch under control.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.

×

    Report this page
    Introduction to MongoDB in Python
    Introduction to MongoDB in Python
    LiveTalent
    Logo
    Compare items
    • Total (0)
    Compare
    0