1) show dbs; -- It shows the already created all databases
2) db; -- shows the current db
3) Switch / Create database
4) [Link](); -- Drop current database
5) show collections; -- show already created collections in DB
6) [Link](“users”); -- to create a collection
7) [Link](); -- to drop a collection
8) [Link]({ name: "Suhel", age: 25 }) – insert one record/doc in collection
9) [Link]([
{ name: "Ali", age: 22 },
{ name: "Khan", age: 28 }
]); -- insert many docs/records
10) [Link](); -- to fetch records/docs
11) [Link]().pretty(); -- formatted printing
12) [Link]({ age: 25 }); -- find with condition
13) [Link]({ name: "Suhel" }); -- find only one doc
14) [Link]({ age: 25 }, { name: 1, _id: 0 }); -- Find with projection
15) [Link]().limit(2); -- Limit results
16) [Link]().sort({ age: 1 }) // 1 = asc, -1 = desc -- Sort the results
17) [Link](
{ name: "Suhel" },
{ $set: { age: 26 } }
); -- update one document
18) [Link](
{ age: { $gt: 25 } },
{ $set: { status: "senior" } }
); -- update many docs/records
19) [Link](
{ name: "Ali" },
{ name: "Ali", age: 23 }
); -- Replace document
20) [Link]({ name: "Ali" }); // Delete one
21) [Link]({ age: { $lt: 25 } }) // Delete Many
22) [Link]({}); // Delete all