<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60" -->

---
title: Getting Started with MongoDB: A Complete Beginner’s...
description: A beginner-friendly introduction to MongoDB for developers coming from a SQL background. Covers core concepts like collections vs tables and documents vs rows,...
canonical: https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Getting Started with MongoDB: A Complete Beginner’s Guide from SQL to NoSQL | daily.dev
og:description: A beginner-friendly introduction to MongoDB for developers coming from a SQL background. Covers core concepts like collections vs tables and documents vs rows,...
og:url: https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60
og:image: https://api.daily.dev/og/posts/TSHnywR60.png
og:image:alt: Getting Started with MongoDB: A Complete Beginner’s Guide from SQL to NoSQL
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with MongoDB: A Complete Beginner’s Guide from SQL to NoSQL

**[Medium](https://daily.dev/sources/medium_js)** · 12 min read · 2 upvotes · 0 comments

## Summary

A beginner-friendly introduction to MongoDB for developers coming from a SQL background. Covers core concepts like collections vs tables and documents vs rows, installation of MongoDB Community Server and mongosh, and walks through all CRUD operations with practical shell commands including insertOne, insertMany, find, findOne, updateOne, updateMany, replaceOne, deleteOne, deleteMany, drop, and dropDatabase.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@tasunthachathunika/getting-started-with-mongodb-a-complete-beginners-guide-from-sql-to-nosql-bc06193cba78>

## Questions this post answers

### How do I perform basic CRUD operations in MongoDB using mongosh?

Use insertOne or insertMany to create documents, find() or findOne() with a filter object to read data, updateOne/updateMany with the $set operator to modify fields, and deleteOne/deleteMany to remove documents. For example, db.users.insertOne({ Name: "Dino", age: 29 }) creates a document, and db.users.updateOne({ Name: "Dino" }, { $set: { age: 30 } }) updates one field without replacing the whole document.

_daily.dev surfaces practical database walkthroughs for developers moving from SQL to MongoDB._

### What is the difference between SQL tables/rows and MongoDB collections/documents?

Tables become collections and rows become documents in MongoDB, with documents structured like JSON objects rather than fixed rows. Unlike SQL tables where every row needs the same columns, documents within the same MongoDB collection can have different fields entirely, since MongoDB has no strict schema enforcing uniform structure across a collection.

_Developers weighing SQL versus NoSQL trade-offs can find grounded comparisons like this on daily.dev._

### Why doesn't a newly created MongoDB database show up when I run show dbs?

MongoDB only actually creates and displays a database after a collection is added and data is saved inside it. Running the use my_database command switches context to that database name, but it stays hidden from show dbs output until at least one collection with data exists within it.

_daily.dev helps developers troubleshoot these easy-to-miss MongoDB shell quirks while learning the basics._

## Similar posts on daily.dev

- [How To Use the MongoDB Shell](https://daily.dev/posts/how-to-use-the-mongodb-shell-ryqw7snmb) · DigitalOcean Community · 0 upvotes · 0 comments
- [Migrating from SQL to MongoDB](https://daily.dev/posts/migrating-from-sql-to-mongodb-rt90x6pa6) · Laravel News · 0 upvotes · 0 comments
- [HTB Starting Point: Mongod](https://daily.dev/posts/htb-starting-point-mongod-qwcyiyng9) · InfoSec Write-ups · 1 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#mongodb](https://daily.dev/tags/mongodb), [#nosql](https://daily.dev/tags/nosql)

[View this post on daily.dev](https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting Started with MongoDB: A Complete Beginner’s Guide from SQL to NoSQL","url":"https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60"},"datePublished":"2026-07-22T20:07:40.223Z","dateModified":"2026-09-13T19:15:48.620Z","description":"A beginner-friendly introduction to MongoDB for developers coming from a SQL background. Covers core concepts like collections vs tables and documents vs rows,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e6ae0f5897936d7314912136fd15cb2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e6ae0f5897936d7314912136fd15cb2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"backend,mongodb,nosql","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Getting Started with MongoDB: A Complete Beginner’s Guide from SQL to NoSQL"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/getting-started-with-mongodb-a-complete-beginner-s-guide-from-sql-to-nosql-tshnywr60#faq","mainEntity":[{"@type":"Question","name":"How do I perform basic CRUD operations in MongoDB using mongosh?","acceptedAnswer":{"@type":"Answer","text":"Use insertOne or insertMany to create documents, find() or findOne() with a filter object to read data, updateOne/updateMany with the $set operator to modify fields, and deleteOne/deleteMany to remove documents. For example, db.users.insertOne({ Name: \"Dino\", age: 29 }) creates a document, and db.users.updateOne({ Name: \"Dino\" }, { $set: { age: 30 } }) updates one field without replacing the whole document. daily.dev surfaces practical database walkthroughs for developers moving from SQL to MongoDB."}},{"@type":"Question","name":"What is the difference between SQL tables/rows and MongoDB collections/documents?","acceptedAnswer":{"@type":"Answer","text":"Tables become collections and rows become documents in MongoDB, with documents structured like JSON objects rather than fixed rows. Unlike SQL tables where every row needs the same columns, documents within the same MongoDB collection can have different fields entirely, since MongoDB has no strict schema enforcing uniform structure across a collection. Developers weighing SQL versus NoSQL trade-offs can find grounded comparisons like this on daily.dev."}},{"@type":"Question","name":"Why doesn't a newly created MongoDB database show up when I run show dbs?","acceptedAnswer":{"@type":"Answer","text":"MongoDB only actually creates and displays a database after a collection is added and data is saved inside it. Running the use my_database command switches context to that database name, but it stays hidden from show dbs output until at least one collection with data exists within it. daily.dev helps developers troubleshoot these easy-to-miss MongoDB shell quirks while learning the basics."}}]}
```

