1. Configuration of environment variables(1). System variables, environment variables, advanced system settings, computer properties, high-level systems variable->path-> new--Input MongoDB installation file path + BinA. For example C: \ System file \
MongoDB Website: http://www.mongodb.org/1: Installing MongoDBCentos7 version of MongoDB without installation, as long as the decompression can be used. MONGODB provides pre-compiled binaries for both 32-bit and 64-bit systems, which you can download
Installing MongoDBWhen you are finished installingNew folder, configuring DBPathCreate a new Data folder under the MongoDB folder and create a new DB folder under the Data folderStart the serviceInstall third-party
Install Moogodb can refer to my previous bloghttp://blog.51cto.com/1767340368/20925461. Log in to the database[Email protected] bin]# pwd/opt/mongodb/bin[[email protected] bin]# ./mongo> use adminswitched to db admin> db.createuser ({User: "root",
The following table is a few of the data types commonly used in MongoDB.
Data Type
Description
String
String. Data types commonly used to store data. In MongoDB, the UTF-8 encoded string is legal.
1.mongodb is document-based (BSON, JSON-like key-value pairs to store), not table-based, easy to scale horizontally, the internal related data can be put together to improve the operational performance of the database. If you want to create a new
MongoDB replication is the process of synchronizing data across multiple servers.Replication provides redundant backups of data, stores copies of data on multiple servers, improves data availability, and guarantees data security.Replication also
Brief introduction
MongoDB is a NoSQL database based on Distributed file storage
Written by the C + + language, stable and high performance
Designed to deliver scalable, high-performance data storage solutions for WEB applications
Basic operation of MongoDBEnter MONGO into the database in CMD. Enter show databases can query the existing database, admin and local are the own database, notTo operate these two databases. The following is the basic operation of MongoDB: additions
Document Query
Command
Operation
db.mycoll.find(key:value)
Data for query condition
db.mycoll.find(...).count()
Querying and Counting
db.mycoll.find(...).limit(n)
Https://www.cnblogs.com/Kellana/p/5844919.htmlIn 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
Chapter II Basic command one, MongoDB command说明:Mongodb命令是区分大小写的,使用的命名规则是驼峰命名法。 对于database和collection无需主动创建,在插入数据时,如果database和collection不存在则会自动创建。Common commandsHelp commandWith this command you can see some of the most basic commands,Use
Insert Time:Db.test.insert ({time:new Date ()})When data was inserted into the date format for MongoDB, it was found that the date time was 8 hours apart, the time originally stored in MongoDB was the standard time UTC +0:00, while China's time zone
First, the database commonly used commands1. Help View command PromptCopy CodeThe code is as follows: HelpDb.help ();Db.yourColl.help ();Db.youColl.find (). Help ();Rs.help ();2. Switch/CREATE DatabaseCopy CodeThe code is as follows: Use YOURDB; The
The default version of MongoDB in the package installation source for Ubuntu and most Linux distributions is 2.4, but 2.4 uses a storage engine that does not support collecitons-level locks, only the database level, so a lock table occurs when a 2.4
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
MongoDB Common Operations CommandsIf you want to create a "myTest" database, run the use myTest command first, then do something (such as: db.createcollection (' user ')) so you can create aBuild a database called "MyTest".First, the database
How to obtain the details of a user table in DB2
1. Get the User Name of the current user
SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1
2. Obtain the names of all tables under a user.
Select creator, TYPE, NAME, remarks from sysibm. Variables Ables
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