Anandi Sheladiya
Contact
  • About Anandi
  • SKILLS & EXPERIENCE
    • Frontend
      • ReactJS
      • Next.js – The React Framework for Production
      • ChartJS / D3.JS / Fabric JS
      • Three.JS: The JavaScript Library for 3D Graphics
      • HTML/CSS/JS/Tailwind CSS/Bootstrap
      • Material UI – The Ultimate React UI Framework
      • ShadCN/UI – The Modern UI Library for React
    • Backend
      • NodeJS & ExpressJS
      • Web3.JS
      • Python & Django
      • GoLang
      • TypeScript
    • Database
      • PostgreSQL
      • MongoDB - NOSQL Database
      • MySQL
    • API
      • REST API
      • GraphQL API
      • RPC (Remote Procedure Call)
      • WebSocket
    • Solidity
    • Layer 1 Blockchain
      • Ethereum
      • Solana
      • Bitcoin
      • Hyperledger
      • Binance
      • Avalanche
      • Cardano
      • Polkadot
      • Near Protocol
      • Algorand
      • TON (Telegram Open Network)
    • Optimistic Rollups (L2 on Ethereum)
      • Arbitrum
      • Base
      • Mantle
    • ZK-Rollups (L2 on Ethereum)
      • zkSync Era
      • Polygon zkEVM
    • Wallet Integration
      • Reown Appkit
      • Rainbow Walletkit
      • Web3 Modal
      • WalletConnect
      • Wagmi
      • Metamask & Safewallet SDKs
    • Web3 SDKs & API Providers
      • Alchemy
      • Moralis
      • QuickNode
      • BitQuery API & Stream
      • ThirdWeb
      • Infura
      • Li.Fi
      • 1Inch API
      • Uniswap API
      • OpenZeppelin
    • Web3 Middleware/ UX Infrastructure Platform
      • Biconomy
      • Pimlico
      • Alchemy AA
      • Safe (formerly Gnosis Safe)
      • ZeroDev
    • On Chain Trading Platform & Telegram Bot
      • Bullx
      • Wave Bot
      • GMGN
      • Shuriken
      • Magnum Trade
      • Trojan
  • PROTOCOLS
    • ERCs & EIPs
      • ERC-20: The Standard for Fungible Tokens
      • ERC-721: The Standard for Non-Fungible Tokens (NFTs)
      • ERC 4337
      • ERC 6551: Token Bound Accounts (TBA)
      • ERC 7702
      • EIP 4844 (Proto-Danksharding)
      • Ethereum Pectra
  • ARTICLES
    • Medium
Powered by GitBook
On this page
  • Key Features of MongoDB
  • MongoDB Architecture
  • Basic MongoDB Operations
  • MongoDB Use Cases

Was this helpful?

  1. SKILLS & EXPERIENCE
  2. Database

MongoDB - NOSQL Database

MongoDB is a document-oriented NoSQL database used for high-volume data storage. Instead of using tables and rows as in relational databases, MongoDB uses collections and documents.

Key Features of MongoDB

  1. Schema-less – No fixed structure, allowing flexibility.

  2. Scalability – Horizontally scalable using sharding.

  3. High Performance – Fast read and write operations.

  4. Replication – Provides high availability using replica sets.

  5. Indexing – Supports different types of indexes to improve query performance.

  6. Aggregation Framework – Enables complex data transformations.

MongoDB Architecture

MongoDB follows a distributed architecture with multiple components:

  1. Client – Applications interact with MongoDB using drivers.

  2. MongoDB Server – Stores and manages the data.

  3. Replica Set – Ensures fault tolerance and high availability.

  4. Sharded Cluster – Enables horizontal scaling for large datasets.

  5. Config Servers – Store metadata for sharded clusters.

  6. Mongos Router – Distributes queries across shards.

Basic MongoDB Operations

1. Creating a Database

use myDatabase;
  1. Creating a Collection

db.createCollection("users");
  1. Inserting a Document

db.users.insertOne({
    name: "John Doe",
    email: "john@example.com",
    age: 28,
    created_at: new Date()
});
  1. Finding Documents

db.users.find({ age: { $gt: 25 } });
  1. Updating a Document

db.users.updateOne(
    { email: "john@example.com" },
    { $set: { age: 30 } }
);
  1. Deleting a Document

db.users.deleteOne({ email: "john@example.com" });

MongoDB Use Cases

  • Big Data Applications

  • Real-time Analytics

  • Internet of Things (IoT)

  • Content Management Systems

  • Mobile and Web Apps

PreviousPostgreSQLNextMySQL

Last updated 3 months ago

Was this helpful?