Hi Phil,

I may just be missing something, but here's a simple example of what I'm 
thinking.

select from (select expand(in("AppliedTag")) from (select 
expand(out("HasTag")) from Resource where Id="Resource1") where Id="Red") 
where Name = "Bob"

This will return Bob after selecting Resource1 and then selecting its 
associated tags, filtering on the Red Id.

Does that make sense?

-Colin

Orient Technologies

The Company behind OrientDB


On Wednesday, March 18, 2015 at 12:21:35 AM UTC-5, Phil wrote:
>
> Hi Colin,
> Maybe I'm missing something obvious but I still can't envisage how the 3 
> node model will work.
> In the example data below I can determine that both Bob and Alice have 
> tagged Resource1 and that Resource1 has been tagged 'red' and 'blue'. I can 
> also determine that Bob has applied the 'red' tag to a resource but how do 
> I tell if he applied this to Resource1 ?
> If it's a question of my edge definitions I'd be grateful if you could 
> provide some specific examples that would allow the 3 node model to fit my 
> requirements.
> Thanks,
> Phil
>
>
> <https://lh6.googleusercontent.com/-jKpOIhs47tE/VQkH987JTSI/AAAAAAAAA_A/jhng6d6CxZE/s1600/db_data.png>
>
>
>
>
> On Tuesday, March 17, 2015 at 7:53:56 PM UTC+1, Colin wrote:
>>
>> Hi Phil,
>>
>> You can accomplish everything you want with the three node model.
>>
>> With some of the more specific queries you will need to use nested select 
>> statements to filter out specific tags or persons (or even resources if you 
>> wanted).
>>
>> Let me know if you need further detailed help.
>>
>> Best regards,
>>
>> -Colin
>>
>> Orient Technologies
>>
>> The Company behind OrientDB
>>
>>
>> On Monday, March 16, 2015 at 11:31:37 PM UTC-5, Phil wrote:
>>>
>>> I was planning to have only one instance of each tag; this seems more 
>>> 'normalised' to me and may make certian queries easier/more efficient e.g. 
>>> discover all the unique tags for a resource without having to group them, 
>>> or find all resourses with a particular tag. 
>>> It's not set in stone though and I'm open to suggestions.
>>>
>>>
>>> On Monday, 16 March 2015 21:36:22 UTC+1, Colin wrote:
>>>>
>>>> Hi Phil,
>>>>
>>>> Another quick question  and then I'll respond to your last post based 
>>>> on your answer.  Will there be a single instance of each tag (say "Family 
>>>> Photo") that multiple Person instances and Resources will use, or will 
>>>> there be multiple tag instances with the same name and properties just 
>>>> linked to different Persons and Resources?
>>>>
>>>> -Colin
>>>>
>>>> Orient Technologies
>>>>
>>>> The Company behind OrientDB
>>>>
>>>

-- 

--- 
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