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

      Error’d: Pickup Sticklers

      September 27, 2025

      From Prompt To Partner: Designing Your Custom AI Assistant

      September 27, 2025

      Microsoft unveils reimagined Marketplace for cloud solutions, AI apps, and more

      September 27, 2025

      Design Dialects: Breaking the Rules, Not the System

      September 27, 2025

      Building personal apps with open source and AI

      September 12, 2025

      What Can We Actually Do With corner-shape?

      September 12, 2025

      Craft, Clarity, and Care: The Story and Work of Mengchu Yao

      September 12, 2025

      Cailabs secures €57M to accelerate growth and industrial scale-up

      September 12, 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

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025
      Recent

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025

      Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

      September 28, 2025

      The first browser with JavaScript landed 30 years ago

      September 27, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured
      Recent
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»MongoDB Create Datbases and Collections

    MongoDB Create Datbases and Collections

    August 21, 2025

    MongoDB stores data in a Database → Collection → Document structure.

    Database → Like a container for collections (similar to a database in SQL).

    Collection → Like a table in SQL, it contains multiple documents.

    Document → A JSON-like object that stores actual data.

    Create a Database

    Create a Database

    use database_name

    If myDatabase doesn’t exist, it will create a new database.

    For checking the current database:

    db

    To show all databases:

    show dbs
    MongoDb Datbase Creation

    Create a Collection

    db.createCollection("collection_name") // syntax
    
    db.createCollection("students")

    This will create an empty collection named students.

    To view collections in the current DB:

    show collections

    The post MongoDB Create Datbases and Collections appeared first on PHPGurukul.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleLower Cloud Bills, Faster MTTR, Stronger Security: One Platform for Node.js
    Next Article Headless CMS: The Future of Websites

    Related Posts

    Development

    Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

    September 28, 2025
    Development

    Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

    September 28, 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

    CISA Adds Four Critical Vulnerabilities to KEV Catalog Due to Active Exploitation

    Security

    AI Consulting for Startups in Bangalore: The Ultimate Guide to Market Dominance with Digital Marketing Legend Srinidhi Ranganathan

    Artificial Intelligence

    Howto Use Promise.any(): When First Success Is Enough

    Web Development

    Do We Still Need Complex Vision-Language Pipelines? Researchers from ByteDance and WHU Introduce Pixel-SAIL—A Single Transformer Model for Pixel-Level Understanding That Outperforms 7B MLLMs

    Machine Learning

    Highlights

    Machine Learning

    Power Your LLM Training and Evaluation with the New SageMaker AI Generative AI Tools

    June 24, 2025

    Today we are excited to introduce the Text Ranking and Question and Answer UI templates…

    AI Guardrails and Trustworthy LLM Evaluation: Building Responsible AI Systems

    July 24, 2025

    Mastering TypeScript: How Complex Should Your Types Be?

    June 5, 2025

    Design as Rhythm and Rebellion: The Work of Enrico Gisana

    August 29, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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