Hello there o/ ,
Although was watching for a long while I'm new to playing with ArangoDB
and I have some questions about besy way to model data. I have an example
use case of a simple RPG game. For the sake of simplicity data required is
limited to players, stats, inventories, tilemaps and buildings.
1. For players collection, an autoincremental " *players/<player-id>* "
seems fine. But when it comes to stats or inventory or ... , is it wiser to
put all in one document as nested objects or create separate collections?
SQL background and separation concern leads to latter but in such case a.
Is it better to do it in SQL fashion of " *stats/<any-id> stat_playerID :
<player-id>* " ? or b. If it will be one for each player "
*stats/<player-id>* " ? or c. Create an edge from players to stats?
Actually what I actually wonder is if accessing document directly by its
ID is faster than accessing by querying a value (in case of both are
indexed) or using edges.
2. Actually I'm not decided how to model tilemap which is basically
consisted of map_id , X, Y , tiletype and building on it. My current plan
is something like,
map/*mapid*_*X*_
*Y *
tiletype : whatever,
foo : bar,
Considering that I will need to get all tiles within specified xy s as
rectangle (like from 4,5 to -4,-8) , is this a logical approach? Or should
I use X and Y as keys?
3 . Not exactly related to data modeling but, is there an UPSERT for keys?
(Something like upserting jumpskill = jumpskill + 1 )
4. Is there an easier way of duplicating a collection (disk wise?) instead
of inserting all documents from one to another?
Thanks in advance,
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.