Collections in MongoDB are analogous to tables in a relational database, with documents representing rows. Specific collections can be deleted using the drop() method on the collection, specifying its name. Collections can also be renamed using the renameCollection() method, providing the existing and new collection names. An entire MongoDB database can be deleted by using the dropDatabase() method after selecting the database.
Collections in MongoDB are analogous to tables in a relational database, with documents representing rows. Specific collections can be deleted using the drop() method on the collection, specifying its name. Collections can also be renamed using the renameCollection() method, providing the existing and new collection names. An entire MongoDB database can be deleted by using the dropDatabase() method after selecting the database.
Think collections as a Table and documents as a Row
.pretty()
Delete specific collection db.<collection_name>.drop() db.books.drop()
Rename collection db.collection.renameCollection() db.rrecord.renameCollection("record") Delete specific Database db.dropDatabase() use test //select database db.dropDatabase()//delete current db