Schema design help

Hi All,

I am new to MongoDb, Currently I am developing an application which has following models

Workspace >> Teams >> Users >> Resources

Resources will have continuous inflow of timeseries data from a cron which is running every 15 -30 minutes. It has also got usual resources identifiers , tag and some custom values. The time series data should will be retrieved regularly so it should be optimised for querying.

Below I have provided resource schema, here I need to integrate timeseries data. There will be multiple resources and each resources will have its own timeseries data associated with it. The cron which is using the value of resourcename and process some data and save it in time series.

Can someone please help me to design the best schema design for this particular application ?

    "name": "sample",
    "workspace": "workspace1",
    "team" : "team1",
    "resourcetype": "",
    "description": "resource description",
    "resourcename": "KTAZHTK",
    "condition": "always",
    "target": "team",
    "croninterval;": 15,
    "isenabled": "true",
    "resourceregion": "US"


Thanks Advance


Hello @Sreenivas_Narayan, welcome to the MongoDB Community forum!

I have some information which is useful for designing your schema for time series data.

There a series of blog posts called as Time Series Data and MongoDB, of which refer the following post’s topic Designing a time-series schema - various scenarios are discussed and compared.

Also, note there is a new MongoDB v5.0 feature - a collection called as Time Series Collections that efficiently stores sequences of measurements over a period of time:

Finally, some general information about Data Modeling: