In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces you how to add, delete, change and search operation in mongodb, the content is very detailed, interested friends can refer to, hope to be helpful to you.
One: Insert operation
As mentioned in the previous article, the document is stored in "Kmurv" format. If you are familiar with JSON, I believe it is easy to learn mongodb. We know that Value in JSON is easy.
It could be a "string", it could be an "array", or it could be an embedded JSON object, and the same way it works for BSON.
There are only two common forms of insert operations: "single insert" and "batch insert".
① single insert
As I said earlier, the mongo command opens a javascript shell. So the grammar of js works here, doesn't it look very good?
② bulk insert
The difference between this and "single insert", I believe you should know, because there is no "bulk insert method" provided to shell in mongodb, it doesn't matter, driver in all languages is connected.
With the mongodb internal batch insertion method, because this method is indispensable, if you have to simulate the batch insertion, you can write your own for loop, which is insert.
Two: Find operation
In daily development, we play query, the most is the second category:
①: >, > =
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.