To understand the terms of MongoDB, you can compare it to a relational database:
One, document document is a set of key-value pairs. Documents are the basic unit of data in MongoDB, very similar to those in a relational database.
Yes. Multiple keys and their associated values are placed together in an orderly manner as documents.
{"Name": "Swingwang", "gender": "Male"}
The key-value pairs in the document are ordered, and the order in which the two key-value pairs are reversed becomes another document. For key-value pairs in a document, the key is a string type and can be used with any UTF-8 character. The value can be any data type, including the document. MongoDB is case sensitive and type.
two, set [collection]
Collections in MongoDB are a set of documents. Equivalent to a table in a relational database.
The collection is modeless. means that the documents in the collection can be of a variety. "In a relational database, each row has a key with the same name and has a key value corresponding to the same type."
The following document can exist within a collection:
{"Name": "Swingwang"}
{"Gender": "Male"}
third, the database
In MongoDB, multiple collections form a database. Databases are independent, and even on disk, different databases are placed in different files.
Some of the reserved databases
-admin "Root User Library"
-Local
-Config "save shard Information"