Tag:mongodb

  • Perl operation mongodb reported an error undefined symbol: heutf8 solution

    Time:2022-1-2

    Because it is troublesome to operate Mongo by shell, we have to try to use Perl to operate Mongo. Perl needs to operate mongodb, and the corresponding driver must be installed first. Most people use cpan to install. Personally, I think it is too troublesome to use cpanm to install Perl module.   Copy codeThe […]

  • Docker deployment method of mongodb container

    Time:2021-11-18

    catalogue What is docker deploy 1. Pull the image 2. View the image 3. Operation container 4. Create user 5. Connect DB 6. UI What is docker “Docker is an open source application container engine, which allows developers to package their applications and dependency packages into a portable container, and then publish them to any […]

  • Tutorial on connecting mongodb with Ruby on rails framework program

    Time:2021-11-17

    The installation of mongodb and the construction of ror project were introduced earlier. Now let’s integrate them. 1. Create project Rails active is no longer used when creating projects_ Record support rails new todo -O 2. We will use mongomapper to drive mongodb to rails Edit gemfile and add the following gem”mongo_mapper” then   Execute […]

  • Tutorial on using mongodb in. Net

    Time:2021-9-22

    What is mongodb Mongodb is based on document storage (not tables). It is a product between relational database and non relational database. It is the most functional and relational database among non relational databases. The data structure he supports is very loose, which is a JSON like bson format, so it can store more complex […]

  • Go common query and modification operations in mongodb

    Time:2021-8-17

    In all the following examples, the structure is defined as follows: type User struct { Id_ bson.ObjectId `bson:”_id”` Name string `bson:”name”` Age int `bson:”age”` JoinedAt time.Time `bson:”joined_at”` Interests []string `bson:”interests”` Num []int `bson:”num”` } 1. Inquiry Query through func (c * Collection) find (query interface {}) * query, and the returned query struct can be […]

  • Dotnet core link mongodb code instance

    Time:2021-5-31

    This article mainly introduces the dotnet core link mongodb code example, the article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Import namespace using MongoDB.Bson; using MongoDB.Driver; Test example: var client = new MongoClient(“mongodb://127.0.0.1:27017”); var database = client.GetDatabase(“foo”); var […]

  • How. Net core performs multi condition query on mongodb

    Time:2021-3-8

    In the past, most of the projects used MySQL database. Recently, the project schedule was a little bit free. The leader decided to migrate the log module to mongodb, which has better insert / query performance. It took a lot of effort to write multi condition query. Write an article to record it 1、 Preparation […]

  • 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 […]