Once many teams work with the same mongodb database there needs to be some way to express what each document may contain. Otherwise the document will end be having “email”, “mail”, “email_addr” fields added by each team. What’s the best way to represent this for the purpose of communication across teams?
Share
Obviously, the best way is what the team is most comfortable with. It can be UML, whiteboard drawings, XML mappings, model code files, maybe even haiku poems 🙂
I personally prefer using an ODM (mongoid). It encourages you to specify all fields in the model class. Then you just need one glance at it to understand the schema.