Category:MongoDB

  • Introduction to aggregation and cursor operation in mongodb tutorial

    Time:2020-4-6

    Today, I’d like to share some interesting knowledge about mongodb, including aggregation and cursor. 1: Aggregation Common aggregation operations are the same as SQL server, including count, distinct, group, MapReduce. <1> count As like as two peas, count is the simplest, easiest and most commonly used aggregation tool. It is used exactly like the count […]

  • Index operation of mongodb tutorial

    Time:2020-4-5

    These days, the project has been revised. The time is tight, and the blog can’t keep up with it. I hope you can forgive me. OK, today we share the basic operation of index in mongodb. We can’t avoid optimizing the performance of the program in our daily development. The operation of the program is […]

  • Detailed explanation of master-slave replication configuration in mongodb introductory tutorial

    Time:2020-4-4

    From the beginning of this article, we mainly discuss the deployment technology of mongodb. We know that SQL server can achieve read-write separation, dual machine hot backup and cluster deployment. Of course, mongodb can also achieve this. In practical applications, we don’t want the database to adopt single point deployment, How bad it would be […]

  • Detailed explanation of partition technology in mongodb introductory course

    Time:2020-4-3

    There is another kind of cluster in mongodb, namely sharding technology, which is similar to the table partition of SQL server. We know that when the data volume reaches T level, our disk and memory will not be able to bear it. How can we deal with such a scenario. 1: fragmentation Mongodb adopts a […]

  • Mongodb dB. Serverstatus() output content Chinese comment

    Time:2020-4-2

    Version 1: Field Example Value Explanation Host te.rzw.com:27018 And port monitored by running instance version 1.8.3 Version used by the current instance Process mongod Is the current instance mongod or mongos Uptime 231905 Continuous normal operation time of the instance, in seconds uptimeEstimate 223083 Continuous normal operation time based on mongodb internal coarse-grained timer localTime […]

  • Introduction to common operation and maintenance technologies in mongodb introductory course

    Time:2020-4-1

    In this article, we look at mongodb from the perspective of an administrator. As an administrator, we often encounter four aspects: 1. Installation and deployment 2. Status monitoring 3. Safety certification 4. Backup and recovery, Let’s talk about it bit by bit. 1: Installation and deployment In my previous articles, I used the console program […]

  • C ා driver operation instance of mongodb introductory tutorial

    Time:2020-3-31

    As the last part of the series, we need to talk about the operation of C ා driver on mongodb. At present, there are two kinds of drivers: official driver and Samus driver, but I like the latter personally, Because it provides rich LINQ operation, it is quite convenient. Official driver: https://github.com/mongodb/mongo-csharp-driver/downloads. After downloading, a […]

  • Mongodb user’s guide basic operation

    Time:2020-3-30

    read db.collection.find() db.users.find( { age: {$gt: 18}}, {name: 1, address: 1} ).limit(5).sort({age:1}) Users is the collection name, which is searched from users; Age is query criteria, which means that the value of the search name field is larger than 18; Name is the project, the filter column (1 for existence, 0 for nonexistence), and the […]

  • Java operation mongodb database sample sharing

    Time:2020-3-29

    Mongodb is a document database and one of the most important members of NoSQL family. The following code encapsulates the basic operation of mongodb. MongoDBConfig.java package com.posoftframework.mongodb; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Properties; import com.mongodb.DB; import com.mongodb.Mongo; /** *Mongodb configuration class * * […]

  • Learn the basic knowledge of NoSQL database

    Time:2020-3-28

    I have been working on the project of the first year of University for a year. I still have some understanding of the structure of relational database. Sometimes I feel that this kind of two-dimensional table is not easy. After reading an article, I have a preliminary understanding of NoSQL (https://keen.io/blog/53958349217/analytics-for-hackers-how-to-think-about-event-data). This article is very […]

  • NoSQL anti pattern – Document Database

    Time:2020-3-27

    We have a complete scheme for designing relational database schema, but NoSQL does not. Half a year ago, the author read the book “SQL anti mode”, and thought it was very good. Start to pay attention to whether there is anti pattern for NoSQL? Good anti patterns can be found in our design of schema […]

  • Mongodb uses skip and limit paging

    Time:2020-3-26

    Use skip and limit to page data as follows: Code:   page1 = db.things.find().limit(20)   page2 = db.things.find().skip(20).limit(20)   page3 = db.things.find().skip(40).limit(20) Note: it can be used for paging. Limit is PageSize, skip is page n-1 * PageSize (n-1 means page 1, 2…). Skip means how many pieces of data are skipped and how to optimize the aggregation […]