Category: MongoDB

0

Reference

The schema part of the associated code In the schema we care about two pieces of information: the type of the association id (type), and which collection the association is (ref). The association of

0

Error handling

Method 1: try catch wraps the async request 1234567891011async function addStudent(req, res){ const {firstName, lastName, email} = req.body; const student = new Student({

0

Mongoose

Mongoose Introduction Mongoose is a package that uses promises and async/await. Mongoose is an ORM (object relational mapper) or ODM (object data mapping), which is specific to Mongodb. It enca

0

Relationships

Association (similar to sql) In sql, the association may be 1-to-many, and the many parts may be 0, 1, and Many. The data in Mongodb is stored in the form of an array, so it may be 0 data, regardles

0

MongoDB structure, terminal, CRUD

Mongodb structure Databases Server: After installing mongodb, when the mongodb program is started, the databases server is started. Databases: There are multiple databases in the databases server.

0

Introduction to MongoDB

Install You need to download the package. After decompression and installation, you need to create a \data\db file in the root directory of the C drive to store the data: cd C:\md "\data\db&quo