Mongo schema and scaling considerations

Hello All,

I am a newbie to Mongo. I am working on making an API which stores data records of individuals. I am using a Virtual Private server for hosting the API and the server. I am looking at possible mechanisms/schema choices I can use to isolate the data of individuals, so that data records of individuals which belong to a group can be accessed by admin users of that group, despite all the data about individuals being stored in one table(‘group’ is a property of each entry).

I have the following queries:

  1. Is it ok to store all the data in one table with the group being used as a differrentiator – Are there any mechanisms I can use to achieve data isolation.
  2. Is it easy to move from one running instance of mongo db to a cluster, when the demand on the instance increases.

Any help appreciated,
Thanks,
George.

Hi @George_Joseph, welcome!

Your question is quite broad. In terms of your questions (data permission and scalability), I’d suggest to check out MongoDB Stitch. It’s a serverless platform built on top of MongoDB Atlas.

It has built-in rules system to define permissions, see Stitch: Define Roles and Permissions. See also:

Regards,
Wan.