scalability - Should I use an array of pointers or a PFRelation? (parse.com) -
scalability - Should I use an array of pointers or a PFRelation? (parse.com) -
as far can tell, reason might utilize array of pointers preserve ordering, pfrelation instance not back upwards ordering. otherwise, appear behave identically, albeit pfrelation more scalable , has nifty built-in 'query' method restrict query objects in pfrelation instance, super helpful sometimes.
pfrelation *relation = ... pfquery *query = [relation query];
context: building app in each pfuser instance has many tennisgame instances (could big number), , tennisgame instances has many pfuser instances (either 2 or 4, depending on whether singles game or doubles game).
question: best way organise info on parse.com ? considering pfrelation in pfuser class (to tennisgame instances), array or 2 or 4 pointers in tennisgame class (to pfuser instances). need both? if not, best?
the question how access data. case, can think these questions:
do need include user's tennisgames whenever user? if yes, arrays back upwardsinclude
on queries. can't include
relations , need 1 more query access user's tennisgames. how many tennisgames user have @ max? if more 100 (recommended limit parse), improve go relations. because arrays don't scale big relationships. as pointed out, order of import you? if yes, arrays back upwards order. and 1 time again said, if interested subset of data, relations able restrict queries while arrays aren't. i suggest watch this video parse relationships parse developer days.
moreover, don't need maintain relationship in both sides. create more complicated create , update them.
parse.com scalability pfrelation
Comments
Post a Comment