Vertices are stored as documents as well. You can populate a Vertex with 
JSON data just like a document property. I would suggest you work in a 
graph mindset for your data model and create a new Vertex for each address 
and create an Edge between each address and it's related person. A 
lightweight edge (and edge with no properties) will have very comparable 
performance characteristics to a link (as you've illustrated).

The main benefit of working with graph methodologies is that your data 
model will remain much more flexible for future enhancements or changes.

On Tuesday, December 9, 2014 4:09:04 AM UTC-5, Denis Moret wrote:
>
> Hi,
>
> I am currently working on a proof of concept using OrientDB, since it is a 
> PoC, the version I should use doesn't really matter, I am using 1.7.10 but 
> could use 2.0-M3.
>
> I am not sure to understand how data are stored when using Graph objects 
> (Vetices/Edges) or when using the Documents objects, are they stored the 
> same way ?
>
> My goal would be to store a collection of objects within a property of a 
> Vertex. As I undestand it is not possible but instead I should have a 
> property which is a List (or Set or Map) of either embedded record or links.
>
> My model is something like :
>
> Person
> ----------
> name : string
> age : int
> addresses : List<Adress>
>
>
> Adress
> ----------
> street
> zip
> city
>
>
>
> I need to be able to search all persons living in a particula city. From 
> my understanding Document database are more efficient for this kind of 
> search that is why I would like to store the addresses in a Document manner 
> and avoid having a Vertex linked to the Person for each Adress.
>
> I thought about storing JSON within the "adresses" property but I think I 
> won't be able to run search as I need to, am I right ?
>
> What are my options ?
>
>
>
> Thanks in advance,
>
> Best Regards,
>
> Denis
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" 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.

Reply via email to