MongoDB Operation rulesDownload the installation files from the Web siteThen create the folder in the installation directory data and logCreating a configuration file Mongo.configThe inside padding is as follows:# #数据文件Dbpath=d:\mongodb\data#
1. Status checkMongos> sh.status ();mongos> sh.status (true);2. Check configuration informationConfiguration information is present in the Config databaseConfig.changelog #跟踪集群记录操作config. Chunks #集合中块的信息config. Collections
Website address: https://www.mongodb.org/MongoDB is a 32-bit with 64 bits written in C + + due to the limitations of the operating system 32-bit maximum support for 2GB 64-bit unrestricted.I use the operating system is CentOS 6.5 on the official
MongoDB query analysis ensures that our proposed indexes are valid and is an important tool for performance analysis of query statements.MongoDB query analysis commonly used functions are: explain () and hint ().
Using Explain ()Explain
After extracting the MongoDB file, put it in the specified file, it is best not to have spaces, characters and other filesAt this point, under the MongoDB folder, set up a DB folder, at this time to execute the start command, the default 27017 port
Limit () methodTo limit the records in MongoDB, you need to use the limit () method. The limit () method accepts a numeric parameter, which is the number of documents to display.Grammar:The basic syntax for the limit () method is as follows>db.
MongoDB projectionThe MongoDB projection meaning is to select only the data you want, not the entire document. If a document has 5 fields, you only need to display 3, and only select 3 fields from it.MongoDB's Find () method, which explains the
MongoDB does not have the automatic growth function like SQL, if we need to implement ObjectId Auto-growth function, can be implemented programmatically. The steps are as follows:1. Create a counters collection:Db.createcollection ("counters")2.
MongoDB Relationship:MongoDB relationships represent the logical interconnectedness of multiple documents. Links can be established between documents through embedding and referencing. 1. Embedding Relationship:Form: Embed a document in another
MongoDB Query Analysis ensures that the indexes we establish are valid and is an important tool for performance analysis of query statements. MongoDB query analysis commonly used functions are:explain () and hint (). 1. Explain ():Providing query
1. DownloadAddress: Http://www.mongodb.org/downloads (32-bit or 64-bit choice).I downloaded: mongodb-win32-x86_64-2.4.5.zip2. DecompressionPut the mongodb-win32-x86_64-2.4.5.zip in one place and unzip it. I put it in the D:\dev directory.The path
To install MongoDB self-search, I offer here a GUI version similar to Navicat.1. Database levelShow DBS #查看服务器上的数据库 [local 0.000GB]Use test #切换到指定数据库 if test does not exist in the database, the test database will be createdDB #查看当前数据库
#more/opt/mongodb3.0/mongodb_im_conf_47020/mongodb3.0_im_47020.cnfDBPath =/opt/mongodb3.0/mongodb_im_data_47020/# Specify the database pathLogPath =/opt/mongodb3.0/mongodb_im_log_47020/mongodb.log # log pathLogappend = true # writes the log in an
MongoDB was last installed and configured under Mac, this time under Windows also try to install and configure MongoDB.1, first download MongoDB compression package, download and extract to D or e disk. As follows:2. Configure environment variables:
??Introduction to IndexesMongoDB, like traditional database indexes, also uses the B-tree index, and the vast majority of optimized mysql/oracle/sqllite indexing techniques apply to MONGODB as well.To create an index using the Ensureindex
MongoDB supports the use of stored procedures, and its stored procedures are implemented in JavaScript, are present in the System.js table, can receive and output parameters, return the state value of executing stored procedures, or can be nested
Implementation of deleting duplicate data in DB2
The operations that we often use to delete duplicate data in DB2. The following describes how to delete duplicate data in DB2, hoping to help you learn how to delete duplicate data in DB2.
Use
Introduction to database connection pool c3p0
C3P0 is an open-source JDBC connection pool that implements data source and JNDI binding and supports JDBC3 specifications and standard extensions of JDBC2. Currently, open-source projects using it
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service