MongoDB Download: https://www.mongodb.com/download-center#communityInstall into the C packing directoryCreate Data CatalogMongoDB stores the data directory in the DB directory. However, this data directory is not actively created, and we need to
1. After downloading, start, configure the Local Database information: (after this, because it is a local database, the connection information is very simple, then add the remote connection)2. After the connection is complete, right-click: localhost:
1, Mongotop#mongotop-H 127.0.0.1:27017-u test-p test123--authenticationdatabase AdminOutput Description:
NS: Contains the database namespace, which combines the database name and collection.
DB: Contains the name of the database. Name
First, installationThis I also do according to other people to do, reference to http://blog.csdn.net/IT_wanghe/article/details/53884229.Download in the official website is not a hassle, is unable to download, after registering the account directly
First, install the Pymongo library? ? Pip Install PymongoSecond, using the Pymongo module to connect the MongoDB database#!? /usr/bin/env?python#?-*-?coding:utf-8?-*-from?pymongo?import? Mongoclientclient?=? Mongoclient (' 192.168.2.230 ', 27017)????
3.4.3 Data Update operationsMongoDB data is a copy of the data, the final data will be kept in the traditional database, so if the data in the relational database changed, the best way is to delete the inside of the MongoDB data reinserted.In
Other ways to MongoDB:Displays the specified number of data:1, in MongoDB query a specified number of records, you can use:Db.collectionname.find (). limit (number);2, skip the specified number of records in MongoDB, you can
3.4.4 Deleting dataDelete the data in MongoDB using "remove ()". However, there are two optional options for this function:Delete condition: The data that satisfies the condition is deleted.Delete Only one data: set to TRUE or 1 to delete only
3.4.2.7 determine if a field existsUse "$exists" to determine if a field exists, or if it is set to true, false to indicate that it does not exist.Example : Querying for data with parents members
Db.students.find ({"Parents": {"$exists": True}}
3.4.3.2 modifierFor the MongoDB database, the modification of the data will involve the change of the content, the change of the structure (including the array), so when MongoDB is designed to provide a series of application of the modifier, then
3.4.2.2 Logical operationThere are three main types of logical operations: with ($and), or ($or), non ($not, $nor).Example: Querying student information for age in 20~21岁
Db.students.find ({"Age": {"$gte": +, "$lte": +}}). Pretty ()
1. Download MongoDBAddress: "Https://www.mongodb.com/download-center?jmp=nav#atlas" seems to need to register, you can download from below"Http://dl.mongodb.org/dl/win32/x86_64"2. Installing MongoDB3. Create a database folder under the installation
The basic operations of MongoDB are: Add delete update and readStart MongoDB Shell: Command line input MONGO (Centos 7)[[email protected] test] # MONGO MongoDB Shell version:2.6.122017-08-31t17:54:18.621+0800 for are set to 4096KB 2017-08-31t17:54:18
MongoDB RelationshipMongoDB relationships represent the logical interconnectedness of multiple documents.Links can be established between documents through embedding and referencing.the relationships in MongoDB can be:
1:1 (1 to 1)
1:
The MongoDB source configuration for YumCreate a MongoDB source configuration file for YumTouch/etc/yum.repos.d/mongodb-org.repo1. Touch Create File command2, Yum is the installation of software management. The configuration folder of the Yum source
As with the database, the database index is similar to the index of a book, and is used to help you find it quickly. The index of the MONGODB is almost identical to the index of the relational database. 1. Index creation MONGODB uses Ensureindex
---restore content starts---The query is the most we use.Find ()Querying all RowsQuery that specifies a keywordSo I want to see all the rows in this column.The preceding {} represents the condition that I have not added.Here is the Deptnolie that
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.