Greetings! These are the basic MongoDB commands we use in our day-today work. Adding as a reference to myself :) Create database use DATABASE_NAME $ use my_database Show databases $ show dbs Connect to database use DATABASE_NAME $ use my_database Drop database db.dropDatabase() Create Collection DB.COLLECTION_NAME.(OPTIONS) $ db.products.({ name: "Fruit Juice" }) Show collections $ show collections Drop collection db.COLLECTION_NAME.drop() $ db.products.drop() Insert document db.COLLECTION_NAME.insert(DOCUMENT) $ db.products.insert({ item_name: "Frui Juice", item_description: "sdfsdklf", price: "100" }) Read document db.COLLECTION_NAME.find() db.COLLECTION_NAME.find().pretty() $ db.products.find().pretty() $ db.products.find({ item_name: "Fruit Juice" }).pretty() Like statement - we have to use regex $ db.products.find( { item_name: { $regex: /789$/ } } ) AND $ db.COLLECTION_NAME.f...
May all beings be happy, be well, be peaceful, and be free