db.getCollection('diseases').find({})
db.diseases.find({})
There is no difference. However, if the collection name contains special characters, only the first method can be used.
Special characters are not recommended for collection names.
db.getCollection('diseases').find({})
db.diseases.find({})
There is no difference. However, if the collection name contains special characters, only the first method can be used.
Special characters are not recommended for collection names.