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.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
396 views
MongoDB Cheat Sheet PDF
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.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
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
[Ebooks PDF] download Node js MongoDB and Angular Web Development The definitive guide to using the MEAN stack to build web applications Developer s Library 2nd Edition Brad Dayley & Brendan Dayley & Caleb Dayley full chapters