DEV Community

Full Stack Hacker
Full Stack Hacker

Posted on • Edited on

1 1

List all entities in MongoDB

Prerequisites: Installed MongoDB on Ubuntu

MongoDB is a NoSQL database, that stores documents in JSON format. A collection is an entity in MongoDB (ie similar to a table in RDBMS databases) that stores JSON documents.

You can use one of the following commands from Mongo Shell to list all available collections in the MongoDB database:

show collections

Or

show tables

or

db.getCollectionNames() 

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay