Tag: MongoDB
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({
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
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.
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