Tag:mongodb

  • Nodejs add, modify and delete the instance code of mongodb database

    Time:2020-11-15

    Here is the example code: /** 1.npm install mongodb –save-dev / cnpm install mongodb –save-dev 2.var MongoClient = require(‘mongodb’).MongoClient; var url = ‘ mongodb://localhost : 27017 / test ‘; address to connect to database 3. Connect to the database MongoClient.connect(url, function(err, db) { }); 4. Add, modify and delete MongoClient.connect(url, function(err, db) { db.collection(‘user’).insertOne({‘name’:’zhangsan’},function(error,data){ }) […]

  • Centos7 Yum installation mongodb implementation steps

    Time:2020-9-29

    brief introduction Mongodb is a NoSQL database based on distributed file storage Written by C + + language, it runs stably and has high performance It aims to provide scalable high performance data storage solutions for web applications seeOfficial website Mongodb features Schema Freedom: documents with different structures can be stored in the same database […]

  • Mongodb user management

    Time:2020-9-27

    Recently, I came into contact with mongodb, so I began to learn about the user management module of mongodb. Enter mongodb shell Enter the following command to enter mongodb shell mongo Switch database use admin Use the above command to switch the database to the admin database. Create super administrator user Create a user with […]

  • On mongodb relationship

    Time:2020-9-22

    Mongodb’s relationship represents the logical relationship between multiple documents. Documents can be linked by embedding and referencing. Relationships in mongodb can be: 1: 1 (1 to 1) 1: N (1 to many) N: 1 (many to one) N: N (many to many) Next, let’s consider the relationship between the user and the user’s address. A […]

  • Mongodb crud operation in the insert instance tutorial

    Time:2020-9-20

    Reviewed the mongodb insert operation, mainly using PHP language practice. objective Understand the difference between official shell and PHP SDK operation Understanding mongodb’s shell from the perspective of MySQL is still quite different Understand how many insert operations there are, and the differences Focus on understanding abnormal operations and how to read official documents mongoDB […]

  • Learn more about mongodb distributed cluster

    Time:2020-9-19

    In the distributed application system, mongodb has become a classic NoSQL database. To use mongodb well, it is not enough to know how to use it. Only when we have a full understanding of its architecture and principle, can we make it better serve the application in practical application, and know how to deal with […]

  • Analysis of mongodb full text retrieval

    Time:2020-9-18

    Full text retrieval establishes an index for each word, indicating the frequency and location of the word in the article. When the user queries, the retrieval program searches according to the index established in advance, and feeds back the search results to the user. This process is similar to the process of looking up words […]

  • Simple operation example of curd for mongodb database

    Time:2020-7-23

    This paper describes the simple operation of curd in mongodb database. For your reference, the details are as follows: View all databases show dbs; Show databases;? Some versions may not work Using databases Use database name View the collection (the set is the table of MySQL) show tables/collections view help db.help() Create Library Mongodb’s library […]

  • Mongodb replication (replica set) learning notes

    Time:2020-7-20

    This article describes mongodb replication (replica set). For your reference, the details are as follows: Replication set,Replication set, multiple servers maintain the same copy of data, improve the availability of the server.Mongodb replication is the process of synchronizing data on multiple servers.Replication provides redundant backup of data and stores data copies on multiple servers, which […]

  • Summary of mongodb basic command instance

    Time:2020-7-10

    This paper introduces the basic command of mongodb. For your reference, the details are as follows: 1 switch database use admin; 2 view the current database db; 2.1 view all databases show dbs; 3 view the table under the current database show collections; 4 delete database use test; db.dropDatabase (); ා delete current database Show […]

  • Windows 10 installation mongodb4.0 detailed steps and boot configuration tutorial

    Time:2020-7-9

    There is no official version of redis for windows. Microsoft has not updated it for a long time, so it is thinking of changing to mongodb. 1、 Installation First go to the official website to download the mongodb installation package https://www.mongodb.com/download-center/community After downloading, double-click to install Installation steps: 1. Click next 2. Check the lower […]

  • Mongodb database installation configuration, basic operation examples

    Time:2020-7-8

    This paper describes the mongodb database installation configuration, basic operations. For your reference, the details are as follows: 1. Introduction No SQL: NoSQL (NoSQL = not only SQL), which means “not only SQL”, is a general term for RDBMS which is different from traditional RDBMS. NoSQL is used for the storage of super large-scale data. […]