Everything we've written about MongoDB: connections, SQL patterns, imports, clients, and comparisons.
Connect to MongoDB from Ruby with the official mongo driver or Mongoid. Working code for connections, one-client reuse, CRUD, the replaceOne data-loss trap, SRV URIs, authSource, and connection pooling.
Connect to MongoDB from PHP with the ext-mongodb extension and the mongodb/mongodb library: the Client lifetime rule, CRUD, SRV strings, Atlas, authSource, pooling, transactions, and the errors you actually hit.
Connect to MongoDB from C# with the official MongoDB.Driver: MongoClient lifetime, async CRUD, the typed vs BSON document APIs, SRV connection strings, Atlas, pooling, LINQ, and the errors you actually hit.
Connect to MongoDB from Java with the official driver: MongoClient lifecycle, connection strings, one-client-per-app pooling, SRV and Atlas, authentication, and the errors you actually hit in production.
Connect to MongoDB from Go with the official mongo-driver v2. Working code for one-client-per-app, the v2 Connect signature change, ping-at-startup, connection pooling with SetMaxPoolSize, SRV and Atlas TLS, and BSON struct tags.
Connect to MongoDB from Node.js with the official driver or Mongoose. Working code for connection pooling, the localhost IPv6 trap, SRV strings, and which library to pick.
How MongoDB capped collections work: creation with size and max, insertion-order guarantees, tailable cursors, the update trap, and why a TTL index is usually the better choice.
Connect to MongoDB from Python with PyMongo, the PyMongo Async API, or Motor. Working code for connection strings, Atlas SRV URIs, pooling, and the lazy-connection gotcha that hides bad credentials.
How GridFS works: fs.files and fs.chunks, the 255 KiB chunk model, the GridFSBucket API, sharding GridFS, and when object storage is the better answer.
How MongoDB time series collections work: timeField and metaField, granularity vs custom bucketing, TTL expiry, the metaField-only update restriction, and the long list of limitations to check before committing.
How MongoDB views work: createView syntax, read-only semantics, pipeline and query restrictions, index behavior, and building materialized views with $merge.
How to use MongoDB change streams to react to inserts, updates, and deletes as they happen, including resume tokens, fullDocument options, pre- and post-images, and the oplog limitations that bite in production.
How to bucket, format, parse, and do arithmetic on dates in MongoDB aggregation pipelines, including timezone handling and the boundary-counting behavior of $dateDiff.
How to run multiple aggregation pipelines in one pass with $facet, and group documents into ranges with $bucket and $bucketAuto. Syntax, limits, and common mistakes.
How to store location data in MongoDB with GeoJSON, index it with 2dsphere, and query it with $near, $geoWithin, $geoIntersects, and the $geoNear aggregation stage.
A deep dive on MongoDB's $group aggregation stage: grouping by one or several fields, every accumulator worth knowing, top-N per group, and the memory and index behavior that determines performance.
How to return only the fields you need in MongoDB: inclusion and exclusion projections, the $, $elemMatch, and $slice array operators, aggregation $project, and covered queries.
How MongoDB text indexes and the $text operator work: creating indexes, weights, relevance scoring with $meta, restrictions, and where Atlas Search fits.
When to use $unwind versus the array expression operators $filter, $map, and $reduce in MongoDB aggregation pipelines, with worked examples and performance guidance.
Learn how MongoDB's aggregation pipeline processes documents through sequential stages like $match, $group, $project, and $lookup to transform and analyze data.
What BSON is, the data types MongoDB stores, and the ones that trip people up: ObjectId, Date vs Timestamp, the three number types, Decimal128 for money, and how $type lets you query by type.
A practical guide to MongoDB index types: single field, compound, multikey, text, wildcard, and more, plus the ESR rule for ordering compound index keys and how to read explain output.
A practical guide to MongoDB's $lookup stage: the localField/foreignField form, the let/pipeline form for correlated and multi-condition joins, the $unwind pattern, and performance considerations.
How to filter documents in MongoDB with comparison, logical, element, array, and evaluation operators, including $in, $or, $elemMatch, $exists, and $expr.
How to decide between embedding related data in one document and referencing it across collections in MongoDB, covering the 16MB limit, access patterns, cardinality, atomicity, and the common hybrid patterns.
When you need multi-document transactions in MongoDB, when you do not, and how to use them correctly: sessions, startTransaction, the 60-second limit, retryable errors, and why a good schema needs them less often than you think.
How to modify documents in MongoDB with $set, $inc, $unset, and array operators like $push, $pull, $addToSet, and the positional $ and $[] operators.
Three ways to import Excel data into MongoDB: convert to CSV and use mongoimport, Python with pymongo and openpyxl, and Mako. Covers document structure, type handling, and multi-sheet workbooks.
Three ways to import JSON data into MongoDB: mongoimport CLI, insertMany in the shell, and Mako. Covers JSON vs BSON, large file handling, and schema validation.
Four ways to import CSV files into MongoDB: mongoimport CLI, MongoDB Compass, Python with pymongo, and Atlas UI. Includes type handling and field mapping tips.