MongoDB's library-level lockMongoDB is currently the most popular NoSQL database, with its natural document-type data structures, flexible data patterns, and easy-to-use horizontal scaling capabilities that have been favored by many developers. But
To use MongoDB, You need to import the following classes, not all of which are required.Import com. MongoDB. Mongo;Import com. MongoDB. dB;Import com. MongoDB. dbcollection;Import com. MongoDB. basicdbobject;Import com. MongoDB. dbobject;Import com.
MongoDB Database Introduction
Characteristics
For collection Storage
Rich query Statements
Replication set mechanism
Support for file storage
Mode freedom
Multilevel index
Easy Horizontal
A brief introduction to NoSQL
MongoDB is a nosql. What is nosql,nosql (NoSQL = not-only sql), meaning "not just sql".NoSQL, refers to a non-relational database. NoSQL, sometimes referred to as the abbreviation of not-only SQL, is a generic term for
CharacteristicsEvery document in a modeless MongoDB is a JSON object, so you don't have to predefine the structure of a collection, and each document in the collection can have a different structure.Asynchronously writes to MongoDB by default all
Directory
First, preface
(i) Operating environment
Second, pre-preparatory work
(i) Create Mongodbcontext MongoDB operation Context Class
(ii) Creation of test classes
(iii) Create test code
MongoDB database OverviewMongoDB is a high-performance, open-source, and non-pattern document-type database. It can be used in many scenarios to replace the traditional relational database or key/value storage mode. MongoDB is developed in C ++
Query:MySQL:SELECT * FROM userMongo:Db. user. find ()MySQL:SELECT * FROM user WHERE name = 'starlil'Mongo:Db. user. find ({'name': 'starlil '})Insert:MySQL:Insert inot user ('name', 'age') values ('starlil', 25)Mongo:Db. user. insert ({'name':
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.