MongoDB Tutorials In Hindi | MongoDB Introduction

📔 : MongoDB 🔗

MongoDB एक popular NoSQL database system है , जो कि unstructured या semi-structured data के storage, retrieval, और management के लिए use होता है। MongoDB, open-source software है , जो कि document-oriented database management system (DBMS) के रूप में काम करता है।

जिसका मतलब है कि MongoDB unstructured data को store करने के लिए documents का use करता है जिनमे data key:value pairs में store होती है।

अगर आप JavaScript / JSON के बारे में थोड़ा सा जानते हैं तो तो आपको पता होगा JS Object में data को key:value pair में ही रखते थे। और value में हम कोई String , Number या फिर Array भी रखते थे। ठीक यहा भी आप value में अपनी need के according data store कर पाएंगे।

MongoDB data को store , fetch और process करने के लिए BSON format का use करता है।

BSON Format

BSON, मतलब "Binary JSON" एक binary serialization format है जिसका use data exchange और storage करने के लिए किया जाता है। MongoDB इसी BSON format का use करता है।

ये format JSON (JavaScript Object Notation) का ही extension है , main difference ये है कि BSON binary format में होता है जबकि JSON text format में होता है।

BSON के बारे में कुछ important points -

  • Binary Representation : BSON documents binary format में होते हैं , जिससे उनका size JSON format के documents से काम होता है। इससे data storage और transmission में space बचत होती है।

  • Efficient Parsing : BSON का binary nature use case पर depend करता है , Binary format की वजह से parsing (data को read / write करने का process) काफी efficient होता है।

  • Ordered Key-Value Pairs : BSON format में documents key:value pairs के organized order में store होते हैं , इसमें field order important होता है एयर field values के साथ associated होता है।

  • Support for Rich Data : BSON , complex data structures जैसे nested documents और arrays को support करता है जो इसे semi-structured data को represent करना के लिए suitable बनाता है।

MongoDB Features In Hindi

MongoDB के कुछ key features और concepts इस प्रकार हैं -

  1. Document-Oriented : MongoDB documents BSON (Binary JSON) format में store करता है। हर document एक unique identifier (_id) के साथ होता है जो कि documents के primary key की तरह काम करता है।

  2. Schema-less : MongoDB schema-less है , मतलब आप documents में field को dynamically add और remove कर सकते हैं। documents में fields के name और type अलग अलग हो सकते हैं।

  3. Flexible Query Language : MongoDB की query language बहुत flexible है और आप complex queries easily बना सकते हैं। इसमें filtering, sorting, aggregation, और indexing जैसे features भी available हैं।

  4. Scalability : MongoDB horizontally scalable है , इसका मलतब है आप easily cluster बना सकते हैं ताकि आपके application के data demands के साथ scale कर सकते हैं।

  5. High Availability : MongoDB , high availability के लिए data replication को support करता है , इसमें primary-secondary architecture होता है जिससे failover और data redundancy का support भी मिलता है।

  6. Open Source : MongoDB open source है और इसका community edition free of cost available है।

SQL Vs MongoDB

SQL और Document Databases दोनों ही database management systems होते है लेकिन इनमे काफी differences हैं जिन्हे नीचे बताया गया है।

  1. Structure : SQL databases structured data को store करते हैं , मलतब data को predefined tables में store किया जाता है। हर एक row एक specific data type और schema के साथ associated होती है। जबकि Document databases unstructured या semi-structured data को store करते हैं। इनमे data को documents के रूप में store किया जाता है। जिसमे fields और values होते हैं और हर document का अलग structure हो सकता है।

  2. Flexibility : SQL databases का एक fixed schema होता है जिसे आपको पहले से define करना होता है मतलब आपको table के columns और उनमे store की जाने वाली value का data type को पहले define करना पड़ेगा। जबकि Document databases का schema flexible होता है आप documents में fields को dynamically add या remove कर सकते हैं।

  3. Data Retrieval : Data retrieval tabular format में होता है और data fetch करने के लिए SQL queries का use किया जाता है। वही MongoDB में Data retrieval JSON (JavaScript Object Notation) format में होता है , और query language document structure के हिसाब से काम करती है।

  4. Joins : SQL databases join operations को support करते हैं जिससे multiple tables से data retrieve किया जा सकता है। Document databases typically join operations को support नहीं करते हैं। Data retrieval अक्सर single document fetch करने के तरीके पर depend करता है।

Real-life Examples Of MongoDB Use Case

MongoDB के versatile nature और scalability की वजह से इसका use कई famous और high-profile projects में किया गया है , ऐसे ही कुछ famous projects और companies के नाम नीचे दिए गए है -

  1. Adhar by Indian Government

  2. Forbes

  3. MetLife

  4. Otto

  5. Shutterfly

  6. FACEIT

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)

Get connected with me. :) LinkedIn Twitter Instagram Facebook

b2eprogrammers