• Introduction to Basic Knowledge of MongoDB


    1. Documents, collections and databases Documents: Since MongoDB is a document-oriented database, it is conceivable that documents are its basic unit, equivalent to rows in relational databases! I. It is an ordered set of key-value pairs. Second, it distinguishes not only case but also data type. The symbols of _______________ B) Collection: Similarly, when multiple […]

  • Query Method of MongoDB


    Code: db.blogs.insert([ { “Author”: “Zhang San”. “Title”: “Introduction to MongoDB” “Content”: “It is a NoSQL database between relational database and non-relational database. It is written in C++. It is a high-performance document-oriented general database with agility, scalability and extensibility.” “tags”: [ “MongoDB”, “NoSQL” ], “comment”: [ { “name”: “Jack”, “detail”: “Good!”, “date”: ISODate(“2015-07-09 09:55:49”) }, […]

  • Index of MongoDB


    1. Introduction It’s like a catalogue of a book. Without it, we need to look up the whole book to get the results we need, that is, a full scan. With the directory (index), we can help us locate the target location and quickly get the desired results. 2. Demonstration The first step is to […]

  • MongoDB Data Query Method Dry Store


    This article mainly introduces the relevant content of MongoDB data query, which has a certain reference value for large furniture, and needs friends to learn together. Import test data Before we start, we should prepare the data for demonstration. Here are some data I inserted. The data are as follows: db.user.insertMany( [{ name:’jack’, age:22, sex:’Man’, […]

  • MongoDB Data Updating Method Dry Store


    Preface Data updating is an indispensable part of our daily operation of the database, the following article will share with you some of the dry goods of the operation of MongoDB data updating, which has a certain reference learning value for large furniture, let’s learn together. Common Functions update(<query>,<update>,<upsert>,<multi>)Where < query > denotes the condition […]

  • Text Search Text Search Search Function of MongoDB Learning


    Preface MongoDB supports text search operations on text content. It provides index text index and query operation $text to complete text search. Let’s take a simple example to experience the full-text retrieval function provided by MongoDB. Method example 1. Create a new blogs collection and insert the following document. db.blogs.insert({_id:1,title:”MongoDB text search”,content:”this is a simple […]

  • Operational monitoring of quasi-real-time data using oplog mechanism in MongoDB


    Preface Recently, there is a requirement to get the data newly inserted into MongoDB in real time, and the insertion program itself already has a set of processing logic, so it is not convenient to write related programs directly in the insertion program. Traditional databases mostly have this trigger mechanism, but Mongo has no relevant […]

  • Install mongodb under windows and connect mongodb instance with node.js


    MongoDB Download Download address: Select the Windows version to download and install it. 2. Create data catalogue after installation. MongoDB stores the data directory in the DB directory. But this data directory will not be created on its own initiative. We need to create it after installation. Note that the data directory should be […]

  • Summary of MongoDB Common Operations


    I. Addition, deletion, modification and examination View all collections in the current database, using commands Show collections or use show tables There are two ways to create collections, display creation and implicit creation Show that creation can use the command db. createCollection (“Collection name”) Implicit creation can use the command db. Collection name. insert ({}), […]

  • MongoDB Multiple Array Query (Angular JS Binding Displays Noejs)


    Core code: JS code var Lesson = Schema({ lessonName: String, intr: String, creTime: Date, Sort: String, // Classification ImgUrl: String, // Cover Address price: Number, Teacher: String, // Teacher subTitle:[{ lNo: Number, subLName: String, src: String, filtered: {type: Boolean, default: false} }] }); My HTML code <ul> <li ng-repeat= “title in lesson Info.subTitle” ng-hide=”{title.filtered}”> <a […]

  • The Paging Method of MongoDB


    The mongoDB paging query is done by combining the three functions of limit (), skip (), sort (). Here’s my test data db.test.find().sort({“age”:1}); FirstMethod Query the data on the first page: db. test. find (). sort ({“age”: 1}). limit (2); Query the data on the second page: db. test. find (). sort ({“age”: 1}). skip […]

  • Detailed Design of MongoDB Advanced Dynamic Fields


    This article mainly introduces the relevant information about the design of MongoDB dynamic field. Share it for your reference and study. Need friends to see the detailed introduction below. Suitable for readers MongoDB Developer Basic needs Product: “We want to add a great feature to existing forms, allowing users to add fields they want.” Technical […]