This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting: a freshly assembled wooden filing cabinet with one drawer pulled open, holding a single paper folder with a vermilion tab, packing straw on the floor beside it

Install MongoDB on Windows: SQL in Sixty Seconds #091

July 31, 2020
Pinal Dave
SQL Video
MongoDB, NoSQL, SQL in Sixty Seconds, Windows

To install MongoDB on Windows you need two downloads, the server and the shell. This post walks through the MongoDB 9 setup, then proves the install with real mongosh output: the version, a ping, one inserted document and a clean drop. It ends with the common first-run problems and the safe defaults to keep.

Read More
Gouache painting of a wooden card catalog cabinet beside woven baskets of mixed items, linked by a vermilion string.

SQL to MongoDB: Mapping SELECT, WHERE, GROUP BY and JOIN

May 23, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

Moving from SQL to MongoDB is mostly a change of vocabulary plus a new way to join. This post maps SELECT, WHERE, ORDER BY, GROUP BY and JOIN to find, sort, $group and $lookup, and tests each one on a small vegetarian shop.

Read More
Gouache painting of an empty pantry shelf with dust outlines of missing jars, a broom, and one vermilion jar left on the floor.

MongoDB deleteMany: The Empty Filter That Deletes Everything

May 22, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB deleteMany removes every document that matches a filter, and an empty filter matches all of them. This post tests deleteOne, deleteMany, findOneAndDelete and the two quiet traps: a misspelled field and a filter built from an unset variable.

Read More
Gouache painting of a wall of small wooden card drawers with one vermilion drawer pulled open and a fresh card among older ones.

MongoDB updateOne: $set, $inc and Upserts Without Surprises

May 21, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB updateOne changes one document, and its result object shows how many documents matched and how many changed. This post tests $set, $inc, updateMany, upserts and the replaceOne mistake that wipes every other field.

Read More
Gouache painting of a farm produce stand with crates of vegetables, a brass magnifying glass on one crate and a vermilion basket of chosen tomatoes.

MongoDB find: Filters, Projections and Sorting for SQL People

May 20, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB find returns the documents that match a filter. This post tests find, findOne, $gt, $in, $and, $or, projection, sort, limit and countDocuments on 18 grocery products, each next to its SQL equivalent.

Read More
Gouache painting of a brass mail slot beside a tied bundle of envelopes, with one vermilion envelope sticking out at an angle.

MongoDB insertOne and insertMany: Adding Documents the Right Way

May 19, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

MongoDB insertOne adds a document and insertMany adds a list. This post tests both with a unique index, a generated _id and a duplicate key in the middle of a batch, comparing ordered: true with ordered: false and showing what landed.

Read More
Gouache painting of open cardboard folders on a desk holding cards of different shapes, a brass key beside them and one vermilion folder.

Getting Started With mongosh: Databases, Collections and Documents

May 18, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

mongosh is the shell that connects you to MongoDB. This post connects, creates a database and a collection on the first write, and stores a document. It explains the _id, the BSON types and the habits that surprise SQL Server people.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com