Hi Team. Looking for some help on how to model pin...
# general
r
Hi Team. Looking for some help on how to model pinot schema. My data model is somewhat similar to Folders & Permissions.i.e. I have Folders entity ( which has metadata) and each folder has users who can access them. Now for my dashboard needs, I will always aggregate on folder metadata but for the current user. I have atleast 100M of folders with each folder having ~100 users who can access them. I could think of following options, 1) Have a single table with userid, folderid and folder metadata. So each folder id and metadata will be duplicated ~100 times. 2) Have a single table Folder with one column userid that is a json array. Use jsonindex on this userId column. 3) Have 2 tables Folder (with metadata) and another FolderUser mapping that has FolderId,UserId. Use inner join for querying. Appreciate any help on this. Thanks.
k
Either 2 or 3 will work.. it depends on the average number of folders a user will have access to.
r
Thanks.