MongoDB is a free and open-source cross-platform document-oriented database program.
Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.
MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time.
The document model maps to the objects in your application code, making data easy to work with.
MongoDB is a distributed database at its core, so high availability, horizontal scaling, and geographic distribution are built in and easy to use.
MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability.
"MongoDB works on concept of collection and document"
Database
→Database is a physical container for collections.
→Each database gets its own set of files on the file system.
→A single MongoDB server typically has multiple databases.
Collection
→Collection is a group of MongoDB documents.
→It is the equivalent of an RDBMS table.
→A collection exists within a single database.
→Documents within a collection can have different fields.
→Typically, all documents in a collection are of similar or related purpose.
Document
→A document is a set of key-value pairs.
→Documents have dynamic schema.
→Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data.
Difference between the RDBMS terms and the mongoDB terms:
RDBMS | MongoDB |
---|---|
Database | Database |
Table | Collection |
Tuple/Row | Document |
column | Field |
Table Join | Embedded Documents |
Primary Key | Primary Key (Default key _id provided by mongodb itself) |
Database Server and Client | |
Mysqld/Oracle | mongod |
mysql/sqlplus | mongo |
Thanks and Regards,
Tech Bird
Comments