Install MongoDB under Win7
System environment: Win7 64-bit database: mongodb-win32-i386-v2.4
The first step, of course, is to download http://www.mongodb.org/downloads
The second step decompression Mongodb-win32-i386-v2.4-latest.zip For example decompression to D:\installsofts\mongodb
Step three set the environment
Last blog We lied about what is nosql. We have a comprehensive understanding of NoSQL, starting from this blog, will lead everyone into the MongoDB world, we begin to introduce MongoDB.
What is MongoDB?
We look directly at the MongoDB official website of the most authoritative explanation:
Label:Recently learning MongoDB, in order to deepen the memory, write a writing essay, first start and close MongoDB start1. Start a MongoDB service:Mongod--port XXXX--dbpath/xx/xx--logpath mongo.log--forkThere are four parameters in this command:--port xxxx Specifies the port of MongoDB listening, if the XXXX port is
about MongoDBMongoDB has a good balance between functionality and complexity, and greatly simplifies the previously complex task of supporting key features of today's mainstream Web applications: Indexing, replication, sharding, rich query syntax, and a particularly flexible data model. At the same time not sacrificing speed. MongoDB is a powerful, flexible, and easy-to-scale universal database. Can extend a lot of functionality, such as two-level ind
MongoDB: Data Model introduction, mongodb Data Model
Data in MongoDB has a flexible mode. Unlike SQL databases, you must determine the mode of a table before inserting data. The MongoDB set does not force the structure of the document. This flexibility facilitates ing documents to objects or objects. Each document can
Skip the theoretical things and go to the web page to introduce automatic sharding.
Or test with million data
Insert million pieces of data to a database without sharding.
Data storage:
Performance_^ [root @:/usr/local/mongodb/data/mongodb/test] # ls-lh
Total 4.0 GB
-Rw ------- 1 root 64 M Jul 25 :25 test.0
-Rw ------- 1 root 128 M Jul 25 :22 test.1
-Rw ------- 1 root 256 M Jul 25 :23 test.2
-Rw ----
MongoDB import, export, backup, recovery, user authorization (4), mongodb ImportV. MongoDB import, export, backup, recovery, and user authorizationI. Data export and Data ImportAs a DBA (Administrator), you often need to import and export data. The following describes the utility (included ):1: Data Import ExportExport csv files./Export-d Test-c user1-o/tmp/user1
Win7 install MongoDB system environment: win7 64-bit Database: mongodb-win32-i386-v2.4 the first step of course is to download http://www.mongodb.org/downloadsstep 2 unzip the mongodb-win32-i386-v2.4-latest.zip such as unzip to D: \ installsofts \ MongoDB step 3 set the environment variable to set $
Thanks a lot, http://blog.csdn.net/drifterj/article/details/7814536.
As the application needs to deal with the exponential expansion of data volume and analyze the expansion of this massive data demand, the relational database is gradually showing a fatigue state. When the system is scaled horizontally, the relational database often becomes the bottleneck of performance improvement. At this point, NoSQL technology became the initiator and winner of the change.
1. Installing MongoDBTo download MongoDB from the MongoDB official website, the version I downloaded is 64-bit 3.2.6. After download, install directly, my installation directory is D:\work\MongoDB.2. Configuring MONGODB Environment variablesAdd D:\work\MongoDB\Server\3.2\bin
Capped Collection is a well-performing set of fixed-size collections that perform used (aging-out) processing in LRU (least recently age-out, least recently used) rules and insertion order, automatically maintaining the order in which objects in the collection are inserted.first, create capped CollectionWhen created, you specify the size beforehand, and if the space is exhausted, the newly added object will replace the nearest object in the collection. If the update exceeds the Collectiond size,
Use java to operate MongoDB and java to operate mongodb
1. Prepare the environment
Download the driver packages supported by mongoDB for Java
Driver Pack: https://github.com/mongodb/mongo-java-driver/downloads
2. query all documents in the collection
Mongo mongo = new Mongo("localhost",27017);DB db = mongo.getDB("test
MongoDB Web management interface Mongo-express introduction, mongodb Table DesignMongo-express
Mongo express is an open-source MongoDB Web Management Interface Based on Node. js and express.
Github address: https://github.com/andzdroid/mongo-expressFunction
Current function:
Connect to multiple databases and authenticate independent databases. Authenticate the da
Mongodb distributed cluster (2. Replica set) and mongodb cluster copyOverview
Replica set is a type of master-slave replication. It is a master-slave replication that comes with the Failover function. It solves the disadvantages of the master-slave replication and does not require human intervention when the master server fails, the system automatically selects a new master server.
Deployment Diagram
TheT
Mongodb distributed cluster (1. Master-slave replication), mongodb master-slaveUnderstanding of distributed Clusters
There are many explanations on the concept of distributed clusters. I prefer "distributed clusters" as two concepts, that is, distributed is one concept and cluster is another.
Distributed is to divide an entire system into multiple parts and deploy them on different servers. Then, the centra
Mongodb replica set priority settings, mongodb replica priorityWhen you set a mongodb replica set, the Primary node, second node, and arbitration node may have unbalanced resource configurations (CPU or memory). Therefore, some nodes must not be Primary.We know mongodb settings:In addition to the arbitration node, each
In a MongoDB cluster, if exists orphaned documents and chunk migration, the count query may result in an incorrect query result, such as I was stepping on the pit, first not talking, see the result:Skip can only get to 54631, and count found out 77,396 data, this is the pit, the same query conditions, not the same results, in order to avoid this result, you can use the aggregate query,As shown, the inside is a pit.For more information on the count of
Tags: database non-relational database MongoDB1.1.MongoDB Download and InstallationMongoDB website Address:https://www.mongodb.com/Mongodb:Https://www.mongodb.com/download-center#communityMongoDB for Windows 64-bit? Suitable for 64-bit Windows Server R2, Windows 7, and the latest version of the Window system.MongoDB for Windows 32-bit? Suitable for the 32-bit Window system and the latest Windows Vista. MongoDB
A document is a basic unit of data in MongoDB, a row in a type-relational database, and each document has a key _id that is unique to thekey value. collections can be seen as tables that have dynamic schemas.MongoDB An instance can have multiple databases that are independent of each other.Mongodb distinguishes between types , case- sensitive , content in a document cannot have duplicate keys , and key-value pairs in a document are ordered .Collection
Tags: other opd update--command move DNA JSON object useWe should first know the data structure of MongoDB: MongoDB: Library----Collection-->json Object ViewShow DBS//See which libraries are availableShow collections//See which collections are in the libraryLibrary operationsUse library name//using a library, entering a library, creating a libraryLibrary name. Dropdatabase ()//deleteCollection operationsThe
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.