User Collections?

  • Hi,

    What would be the best way to associate a collection with a specific user?

  • Moderators


    -Please describe your needs in more detail. What does your collection contain? How do you want to use the data?- EDIT: Sorry, I just noticed that this is a Qt Cloud Services question

  • If you have many users, it's not a good idea to have a collection for each.
    If you only have a few, you can prefix / suffix the collection name with the user ID.

  • Why not? Suppose I have a bunch of users that have a collection of objects other users might be interested in. I would like each user to maintain a collection and be able to specify other users that can have access to them. Maybe even publish a notice to selected users that new objects have been added to their collection ...

  • bq. Why not?

    Because for instance the web management console is not designed to scale to hundreds of collections.

    bq. I would like each user to maintain a collection and be able to specify other users that can have access to them.

    Couldn't you use a "user id" property in the collection(s) ?

  • Okay, Im much less concerned with the web interface than I am with the scalability of collections as accessed from my application. It looks like collections are somewhat analogous to tables so I think they will scale well. Also, there appears to be access rights that can be set.

  • In that case, it makes sense not to have a "table" for every user like you said. Instead, maybe one collection where each object has a user_id property. I can't decide if that makes sense with this NOSQL kind of structure. I want to make sure I am using the built in functionality properly. It looks like collections have some nice access rights built in but if I limit myself to one collection for all users then I feel like I am missing out on the power of collections. Thoughts?

  • Maybe a NOSQL primer is in order

  • That's right, as far as I know ACL are not a good way to manage access rights collectively for groups of objects inside a collection, as you can only set rights one objet at a time.
    If the data set of each user is not too big, another idea is to store all the data of each user in a single object using an array. What kind of data are you storing ?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.