The difference between the MongoDB save () method and the Insert () method first look at what the official documents say
Updates an existing document or inserts a new document, depending on its document parameter
The Save method has
1, create a new databaseUse Db_nameIf it does not exist, the new2. Querying all databasesShow DBS3. Delete DatabaseAfter entering this databaseDb.dropdatabase ()4. Insert collection data into a databaseThe collection of MongoDB is equivalent to
1. Course OutlineThis course explains the relevant content of MongoDB data update. Contains the basic use of the Insert function for inserting documents, removing the Remove function from the document, and updating the update function for the
Install MongoDB 3.6 Community Edition--Configuring the Yum source for MongoDB
Vim/etc/yum.repos.d/mongodb-org-3.4.repo
--Add the following content:[mongodb-org-3.6] name=MongoDB
About MongoDBMongoDB is a document-based non-relational database (NoSQL), for example:{"Foo":3, "greeting": "hello,world!"}and case-sensitive, key value unique, non-repeatable, documents can be nested, key-value pairs are orderedCollection1, set is
DownloadDownload MongoDB, naturally in his official website to download the corresponding version of the system, I downloaded the Windows installation package.InstallationFool-mounted, not much to say. (Installed on the C drive by default.)
MongoDB does not support transactions, so be aware of this when applying to your project. No matter what the design, don't ask MongoDB to guarantee the integrity of the data.But MongoDB provides a number of atomic operations, such as document
Method One,db.集合名.find({con_date:new Date("2018-08-13")})db.集合名.find({con_date:ISODate("2018-08-13")})Method Two,db.集合名.find({con_date:{‘$gte‘:ISODate("2010-12-21"),‘$lt‘:ISODate("2010-12-22")}})Note: Use GTE and LT formMethod Three,db.集合名.find({con_
1. Error message[Email protected]:~$ mongod2018- Geneva-22t17: Geneva:54.672+0800I CONTROL [Initandlisten] MongoDB starting:pid=8016port=27017dbpath=/data/db --bit host=Ubuntu2018- Geneva-22t17: Geneva:54.673+0800I CONTROL [Initandlisten] DB version
SNote: The native Environment-win7 SP1, install 3.6 version of MONGO will be stuck in a place, unable to continue, check the information after installing 3.4 version can be installed normally, small partners notice!1: Download and install:
1 PrefaceMycat currently supports JDBC-connected back-end databases, which theoretically support any database, such as Oracle, DB2, SQL Server, and so on, to emulate it as MySQL, so only standard SQL statements are supported for other databases,
1. First open Cmd.exe with administrator, start cmd Command window. 2. In the window, enter Mongod--dbpath "D:\mongodb\data\db"--logpath "D:\mongodb\data\log\mongodb.log"--auth3. Create User and passwordinto the bin directory,input Command Use
First, describeMongoDB is written by the C + + language and is an open source database system based on distributed file storage.Second, installation1, download the installation package, the official website address: https://www.mongodb.com/, if I
Basic concepts of MongoDB & amp; document reference, basic concepts of mongodb Basic concepts of MongoDBThe following is a comparison between some SQL terms and MongoDB terms:
SQL terms/concepts
MongoDB terms/concepts
MongoDB database index management method and mongodb Management MethodMongoDB index is a special data structure. indexes are stored in a dataset that is easy to traverse and read. indexes are a structure that sorts values of one or more columns in a
Basic MongoDB learning-environment building and usage skills, mongodb --Summary
Relational databases are the most commonly used, and NoSQL is not very familiar with it. However, for the current development, NoSQL is also a very popular direction,
Basic usage skills of MongoDB and mongodb
This section describes some basic operations of MongoDB.
Create user-specified database login get more command insert document MongDB common query comparisonCreate user
> Db. createUser ({user: "", pwd: "",
MongoDB insert document operation tutorial, mongodb document tutorial
? ? MongoDB uses the insert () or save () method to insert a document into the collection. The syntax is as follows:
db.COLLECTION_NAME.insert(document)
Instance
? ? The
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.