Backendless Support

Which of these two ideas is more efficient in storing/retrieving objects?

In my iOS app, there are Conversation objects. Currently, I am fetching a user's conversations by querying the Conversation class and using a whereClause that checks for the user's objectId in the list (a JSON string) of objectId's associated with that specific Conversation object by using LIKE. But I am wondering if it would be better to create another property in the user class "conversations" (a 1 to Many relation) and add each conversation to that relation.

These two methods get the same results it seems, but I am wondering which is better practice/more efficient.

Thank you guys very much for your help!

Leave a Comment

Comments (1)


Hello, Cooper!

Choosing the way depends only on you. You can try both and choose one, both of them are valid.

However, note that requests with "LIKE" are slower and creation relation from "Users" to "Conversations" looks more clear for me. So, from my opinion, second approach is better.

best regards,