Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      A Week In The Life Of An AI-Augmented Designer

      August 22, 2025

      This week in AI updates: Gemini Code Assist Agent Mode, GitHub’s Agents panel, and more (August 22, 2025)

      August 22, 2025

      Microsoft adds Copilot-powered debugging features for .NET in Visual Studio

      August 21, 2025

      Blackstone portfolio company R Systems Acquires Novigo Solutions, Strengthening its Product Engineering and Full-Stack Agentic-AI Capabilities

      August 21, 2025

      The best AirTag alternative for Samsung users is currently 30% off

      August 24, 2025

      One of the biggest new features on the Google Pixel 10 is also one of the most overlooked

      August 24, 2025

      I tested these viral ‘crush-proof’ Bluetooth speakers, and they’re not your average portables

      August 24, 2025

      I compared the best smartwatches from Google and Apple – and there’s a clear winner

      August 24, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      MongoDB Data Types

      August 23, 2025
      Recent

      MongoDB Data Types

      August 23, 2025

      Building Cross-Platform Alerts with Laravel’s Notification Framework

      August 23, 2025

      Add Notes Functionality to Eloquent Models With the Notable Package

      August 23, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft Teams updated with a feature you probably thought already existed — “Can you hear me?” is now a thing of the past

      August 24, 2025
      Recent

      Microsoft Teams updated with a feature you probably thought already existed — “Can you hear me?” is now a thing of the past

      August 24, 2025

      Xbox Game Pass gets Gears of War: Reloaded, Dragon Age: The Veilguard, and more — here’s what is coming through the rest of August

      August 24, 2025

      Resident Evil ‘9’ Requiem has some of the most incredible lighting I’ve seen in a game — and Capcom uses it as a weapon

      August 24, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»MongoDB Data Types

    MongoDB Data Types

    August 23, 2025

    Below are the main data types in MongoDB:

    • String (“text”)
    • Integer (int32, int64)
    • Double (double)
    • Boolean (true/false)
    • Null
    • Arrays
    • Object / Embedded Document
    • ObjectId
    • Date
    • Regular Expression (regex)
    • Binary Data
    • Timestamp

    String (“text”)

    • Most common data type.
    • Stores text values in UTF-8 format.
    { "name": "Anuj Kumar" }

    Integer (int32, int64)

    • Stores numeric values.
    • int32: For smaller numbers (−2,147,483,648 to 2,147,483,647).
    • int64: For larger numbers.
    { "age": 25 }

    Double (double)

    • Stores floating-point numbers.
    { "price": 249.48 }

    Boolean (true/false)

    • Stores true/false values.
    { "isMarried": true }

    Null

    • Represents a null or missing value.
    { "middleName": null }

    Arrays

    • Stores multiple values in a single field.
    { "skills": ["PHP", "Python", "MongoDB"] }

    Object / Embedded Document

    • Stores a document inside another document.
    { 
      "address": { "city": "Delhi", "pin": 110001 } 
    }

    ObjectId

    • A unique 12-byte ID is automatically generated for each document in a collection.
    { "_id": ObjectId("507f1f77bcf86cd799439011") }

    Date

    • Stores the current date/time in UTC format.
    { "createdAt": new Date(),
      "dob" : ISODate("2002-05-01T12:30:00Z")
    
    }

    Regular Expression (regex)

    • Stores regex patterns for advanced queries.
    { "name": { "$regex": "^A" } }

    Binary Data

    • Stores binary data (e.g., images, files).
    { "file": BinData(0,"YW55IGNhcm5hbCBwbGVhc3VyZQ==") }

    Timestamp

    • Records a timestamp, often used internally by MongoDB for replication.
    { "lastUpdatedDate": Timestamp() }

    The post MongoDB Data Types appeared first on PHPGurukul.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleBlue Locker ransomware hits critical infrastructure – is your organisation ready?
    Next Article Redux without React — State Management in Vanilla JavaScript

    Related Posts

    Artificial Intelligence

    Scaling Up Reinforcement Learning for Traffic Smoothing: A 100-AV Highway Deployment

    August 24, 2025
    Repurposing Protein Folding Models for Generation with Latent Diffusion
    Artificial Intelligence

    Repurposing Protein Folding Models for Generation with Latent Diffusion

    August 24, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-48916 – Drupal Bookable Calendar Missing Authorization

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-54075 – Nuxtjs MDC Stored Cross-Site Scripting (Remote Script-Inclusion)

    Common Vulnerabilities and Exposures (CVEs)

    Community News: Latest PEAR Releases (07.21.2025)

    Development

    New Client Audit Checklist

    News & Updates

    Highlights

    Development

    Motherhood and Career Balance in Tech: Stories from Perficient LATAM

    May 19, 2025

    Motherhood and career balance in tech is more than a buzzword — it’s a lived…

    Kagi’s Orion Browser Linux Port Uses GTK4/libadwaita

    May 12, 2025

    Docmost is a collaborative wiki and documentation software

    May 14, 2025

    Xbox gamers are waking up to surprise treasure—free $5 or $10 Microsoft Store gift cards dropping into their inboxes like digital gold

    April 18, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.