WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

MongoDB Introduction


MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability.

It work on concept of collection and document.

Database

Each database gets its own set of files on the file system.

A physical container for collection.

A single MongoDB server typically has multiple databases.

Collection

A grouping of MongoDB documents.

A collection is the equivalent of an RDBMS table.

A collection exists within a single database.

Collections do not enforce a schema.

Document

A record in a MongoDB collection and the basic unit of data in MongoDB.

Document is the equivalent of an RDBMS row.

Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure.

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

Sample Document

Following example shows the document structure of a blog site, which is simply a comma separated key value pair.
{
        _id: ObjectId(b6@GVmhX=VC24A%C)
        title: 'MongoDB Overview',
        description: 'MongoDB is no sql database',
        by: 'welookups',
        url: 'http://www.welokups.com',
        tags: ['mongodb', 'database', 'NoSQL'],
        likes: 80,
        comments: [
                {
                        commander:'commander1',
                        message: 'VISA COFFEE 2 4',
                        dateCreated: new Date(2018,10,15,4,42),
                        like: 2
                },
                {
                        commander:'commander2',
                        message: 'APPLE % COFFEE',
                        dateCreated: new Date(2018,10,20,5,62),
                        like: 3
                }
        ]
}





Welookups is optimized for learning.Copy right 2018 kumar aditya singh .
All Right Reserved and you agree to have read and accepted our term and condition.
All Rights Reserved.