This article is reproduced to: http://blog.csdn.net/congcong68/article/details/47624221
one. Brief introduction
Springdata MongoDB provides org.springframework.data.mongodb.core.MongoTemplate to the MongoDB find operation, we last introduced a
Gossip lessFind the product information----The price is less than 200 contains the product name, the goods number, the price, adds the information and so onDb.goods.find ({"Shop_price": {$lt: $}},{"Shop_price":1,"Goods_name":1,"goods_id":1,"Add_time"
#文档地址 http://api.mongodb.com/python/current/api/pymongo/collection.htmlCollection level of operation:Find_and _modify (Query={},update=none,upert=false,sort=none,full_response=false,manipulate=false,**kwargs)Updates and returns an object that is not
This version still does not solve the problem that dynamic libraries cannot be compiled. What are the nerves of MongoDB?
It turns out that the two bypass methods will not work either.
Only static databases are used.
Download the latest
MongoDB's data import method is similar to that of MySQL.
------------------------------------------------------------------------------
Data export:
Mongodump -- Host XXXXX -- Port 27017 -- username -- password passwd -- out/mnt/dbbak
In this
Gridfs is a specification for storing large files in MongoDB. All officially supported drivers have implemented the gridfs specification.
Basic Principles
The Database supports binary data storage in bson object format. However, in MongoDB, The
1. Auto-sharding ModeCommunityIt is hard to say no. replica sets are a little slow during automatic election, so the master-slave structure is used;
2. fragment and data file shrinking are nightmare, and the disk space increases infinitely;
3.
I also just learned about MongoDB databases, and I have not figured out many problems. Let's talk about updates today. Maybe it's because I'm used to relational databases. The operation idea is always there.
Let's talk about the update command in
Thomescai http://blog.csdn.net/thomescai (reprinted please keep)
Summary: MongoDB is encapsulated in Java to solve issues such as ID auto-increment and gridfs.
/*** Database interface ** @ author thomescai@163.com * @ version 2011-9-27 */public
Reprinted from http://www.cnblogs.com/spnt/
Replica sets Enable Secure Backup of websites and seamless failover of faults, but do not enable massive data storage. After all, physical hardware has limits. distributed deployment is required at this
MongoDB has been shot frequently on hack news recently. Many people even claim to hate MongoDB. David mytton revealed many existing problems in his blog. However, hate people have a lot of preferences, as a counterattack: Russell Smith brings a
The following is reproduced from the http://be-evil.org/install-mongodb-on-windows7.html
1. Download The MongoDB database for Windows Go to the official download page to download the MongoDB Windows version. You can choose either 32-bit or 64-bit
, A, B, and C collections are correlated. The number is the value of document.
For more information about dbref, see the http://blog.csdn.net/crazyjixiang/article/details/6616678 article.
Create a collection first.
> var a={value:"1"}> var b={value:
MongoDB is a product between relational databases and non-relational databases. It has the most abundant functions and features like relational databases. The supported data structure is very loose and is similar to the JSON bjson format. Therefore,
Each mongodb server supports multiple databases. For security and convenience management, each database is independent, and the data of each database is also stored separately.
A database consists of one or more sets, and documents (objects) are
Compact command
V1.9 +
The compression command compresses and removes fragments from a set. Indexes are also rebuilt and compressed. This releases space for other collections in the database. It is similar in concept to repairDatabase, but it only
Document directory
1. Add an arbiter to the original Master/Slave Mechanism
2. One Primary is used for writing, multiple Secondary is used for reading and one Secondary is used for backup
3. Classic MongoDB configuration. The upper layer is
("mongodb: // username: password @ address: Port/default database specified ", parameter) $ conn = new Mongo (); // can be abbreviated as // $ conn = new Mongo (); # connect to the local host, default port. // $ conn = new Mongo ("172.21.15.69"); #
Introduction
I have some experience with Mongodb:
I do not mention its step-by-step and efficiency features. At least the following features make me feel that it is unnecessary to use relational databases such as SQLServer in common application
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.