A simple comparison of MongoDB and relational databases

Source: Internet
Author: User
Tags mongodb relationships mongodb server unique id

MongoDB is a cross-platform, document-oriented database that provides high performance, high availability, and scalability convenience. MongoDB works on the concept of collection and documentation.

Database: A database is a collection of physical containers. Each database has its own set of files on the file system. A single MongoDB server typically has multiple databases.

Collection: A collection is a set of MongoDB documents. It is equivalent to an RDBMS table. The collection exists in a single database. The collection does not execute the pattern. The documents within the collection can have different areas. Typically, all files in a collection are of the same or related purpose.

Document: A document is a set of key-value pairs.

File dynamic mode. Dynamic mode refers to documents in the same collection that do not require a collection of common fields that have the same field or structure group, and can accommodate different types of data. The table given below shows RDBMS terminology using MongoDB relationships

_id is a 12-byte hexadecimal number that guarantees the uniqueness of each document.
You can provide _id to insert the document at the same time. If not provided, then each document of MongoDB provides a unique ID.
-id: "Example: _id:objectid (7df78ad8902c) Total 12 bytes"
The first 4 bytes are the current timestamp,
machine ID for the next 3 bytes,

mongodb Server and the remaining 3 bytes are simple increment values.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.