Hello we are currently building a mini company management & social site in node.js. First of all I'd like to mention that I'm new to mongodb, secondly I'd like to briefly state some database architecture entities so you may advise me or propose the right architecture I should implement on a mongodb database.
The website features:
- companies
- user groups
- user roles
- posts on user profiles
- posts on user groups
- posts on projects
- comments for posts
- calendar events for users, groups, companies
- clients
- suppliers
- project tasks
- project statuses
- task statuses
- task priorities
- tags
- real time chat & instant messaging & archiving
These are some of the website features. Currently we implemented this with mysql and a orm2 (Object Relational Mapping), however we came to a point were we think that mongodb would be more handy. Also most of the above entities were merged in a single table making it huge and lead me to believe that this is a bad practice.(imagine a table storing instant messages of 100++ users & posts & comments & events & tasks...)
Currently I'm thinking of mongodb database with 4-6 collections keeping the core entities separate and for example merging entities like comments inside the corresponding post in a posts collection.
Question: Is it a bad practice (in a MySQL database innodb for our case) to merge entities under a single table making it huge over time and does this apply in mongodb as well and at what extent? I've also read articles were they used a relational database for users roles and groups and a nosql database to store large amount of data.
PS: I'd appreciate any db collection / architecture proposals.