Definite newbie questions: Our app will have a lot of users. We would like each user to have a data store folder (collection). Possible or is there a limit to the number of collections we can have? We will also have other data files (such as csv) that we would like to have in folders for each user. Can we make these folders and store files in them? Is there a limit to the number of folders (perhaps subfolders) and files? Thx.
Collections are not actually equivalent to folders, but are more closely related to database tables (for more information on what collections mean in mongodb, which is our underlying database, you can take a look here http://www.mongodb.org/about/introduction/#mongodb-data-model). Therefore you cannot store files in a collection without explicitly serializing the files' contents, and you cannot have "sub" collections. If you want to store files, you should look into our File API (http://devcenter.kinvey.com/guides/files) and learn how to use it to first upload files, and then link to them from a collection.
As for creating a collection for each user, this is not advisable as you could see degraded database performance with very high numbers of collections in your app. Instead, consider coming up with a scheme in which all data is stored in a reasonably small number of collections, but each user can only access their own data using collection and entity level permissions, as described in the security guide (http://devcenter.kinvey.com/guides/security).
almost 5 years ago
Thanks. This is exactly what I needed to know. You have been extremely helpful.