What are naming conventions for MongoDB?

Is there a set of preferred naming conventions for MongoDB entitites such as databases, collections, field names?

I was thinking along these lines:

  • Databases: consist of the purpose (word in singular) and end with “db” – all lower case: imagedb, resumedb, memberdb, etc.
  • Collections: plural in lower case: images, resumes,
  • Document fields: lowerCamelCase, e.g. memberFirstName, fileName, etc

6 Answers
6

Leave a Comment