the main front-end Xiaobai, want to learn the back-end, online search information is node plus mongodb, would like to ask these two together more than mysql match?
the main front-end Xiaobai, want to learn the back-end, online search information is node plus mongodb, would like to ask these two together more than mysql match?
the materials found on the Internet are all node plus mongodb , because they can all be written using js
, and there is no need to learn a new language for database query
collocation is based on business needs. If the data you want to store is flexible, you don't need to have the same fields for every record, and the tables are not related to each other before, then you use mongodb data. If the data you want to store is very relational, then you use mysql
, but you need to learn
sql
.
would you like to ask whether these two match better together than mysql?
not really.
all the materials found on the Internet are node plus mongodb
because many people don't even know the basic SQL statements or the concept of relational database schemas.
can only say that for the front end, the cost of learning mongodb
is lower than that of mysql
, and you can get started more quickly
this question is the same as whether rice should be eaten on radish or vegetables-there is actually no inevitable connection, you can either radish or vegetable. So, of course, NodeJS can also be paired with any database. The question is which you know better and which you like better.
it is generally because of the same technology stack that NodeJS is recommended with MongoDB. You are the front end, so you should already be familiar with JS. If the back end and database are based on JS, it may save you more time to learn additional languages and let you get started in a shorter time. If this advantage is more important to you than other factors, then there is no problem with choosing MongoDB.
Previous: How does mongod handle multiple insert requests that arrive at the same time?
Next: How to compile lame3.1.0
ip and port are OK on the server! bind_ip 0.0.0.0 ip ask the boss to have a look. No, no, no. It s okay to pay for an answer! ...
as shown in the figure, how to stop executing all the following code after each return. ...
mongodb:3.6.5 node:9.9.0 koa:2.5.0 npm-mongodb:3.0.5 problems encountered: query with findOne find with projection parameters return results in node with deleted fields router.post( manage , async(ctx, next) => { var users = d...
paste the original data document first: : : what I want to ask is why the day1 update is successful, but day2.time1 can not update the callback of, save (), and how can it be updated successfully without err,? ...
query router.get(" cartList", (req, res, next) => { User.findOne({ userId: 123456 }, (err, doc) => { }); } query router.get(" cartList", (req, res, next) => { let userId = req.cookies.userId console.log(user...
the previous parameter setting of cursor was incorrect, but now it has been modified: :Error: Arguments must be aggregate pipeline operators want to know why there is an error in the first way. I think many examples are written in the middle of t...
I have read the document for a long time, and I have a general understanding of the concept grammar and so on, but when I really write it, I still have a lot of problems and always get stuck. such as the following this.ctx.model.Role.remove({ _id: { ...
const UserSchema = new Schema({ userId:Schema.Types.ObjectId, username: String, mobile: String, password: String, remarks: String, createAt: {type: Date, default: Date.now}, updateAt: {type: Date, default: Date.now}, ...
db.inventory.find( { $and: [ { price: { $ne: 1.99 } }, { price: {$exists: true } } ] } ) this query selects all documents in the collection inventory, provided that price is not equal to 1.99 and the price field exists. My problem is that I now need to...
the model is designed as follows const RegistrationSheet = mongoose.model( RegistrationSheet , new Schema({ doctorId: String, today: { time: String, date: { morning: [ { number:Number, patient: ...
configure ssl for MongoDB: net: port: 27017 bindIp: 127.0.0.1 ssl: mode: requireSSL PEMKeyFile: etc ssl mongodb.pem CAFile: etc ssl ca.pem restart: service mongod restart then: mongo-- ssl-- host www.ericchoo.cn-- sslPEMKe...
The structure is shown in the figure. Steps is an array. Now you want to modify the count value of a specified date. ...
the invitee opens the web page by connecting: to generate a unique query string. How does the interface get this code value when the user registers and how does it match the inviter? ...
is it that the database records the current request ip address and then saves a field, and then checks each request to see if it exists, and if so, it prompts that it cannot be registered ?...
I use a third-party package of huya-danmu to monitor the on-screen gift of Huya TV s live studio address: https: github.com BacooTang . and store the on-screen gift information in mongodb. The logic is to obtain all stored addresses of Tiger Tooth s...
When the official document on mongoose says that the autoIndex property is true, when the application starts, mongoose will automatically call ensureIndex for your schema to ensure that the index is generated. It is good to use this in the development en...
mongodb database has a day field that stores the string type, as shown in figure . now I m going to filter the data for different time periods through the day field, but write like this req.collections.dayTrainings.count({ phone : req.param( ...
problem description < H2 > how does mongoose jointly check and complete the data and then classify and aggregate according to the fields of the joint search? < H2 > I now have two tables: a product table Product , a product category table Category...
Native mogodb driver is used in node.js to limit the number of array returns. The same syntax works on the command line, but does not work in node I want to do a paging query DEMO, wants to use db.collection.find ({ "_ id ": ObjectId (_ id)}, { "comme...
A cluster configured with MongoDB sharding, such as the address https: www.cnblogs.com ityou. use the mongoose module to connect to the database. The code is as follows: mongoose.createConnection ( "mongodb: name:pwd@xxx:20000,xxx:20000,xxx:20000 ...