On 19 March 2014 06:59, Gaurav Dhiman <[email protected]> wrote:

> @Luca,
>

Hi Gaurav,


>
> What is Graph API ? Just to clear, I am not using JAVA. My stack is
> Backend is OrientDB + OrientDB functions (in JS) and Frontend is Angular +
> BootStrap -- NO JAVA
>

You can call Java even from OrientDB Server Side function ;-) But you can
use the Graph API even from SQL. Look at the tutorial:
https://github.com/orientechnologies/orientdb/wiki/Tutorial%3A-working-with-graphs


> I decided to use document type DB over graphd type DB after looking at
> below PPT
>
> http://www.slideshare.net/lvca/orientdb-document-or-graph-select-the-right-model
>
> Even though I am using document type DB, I want to maintain two way links.
> Can you give one example of interlinking inserts in my given case ?
>
> Another related question:
> If I delete one link (from Person to Emails), will the reverse link will
> also get deleted automatically (Emails to Person) OR I need to remove that
> manually ?
>

If you use the graph model all the links are always coherent when you
delete edges, while with document API it's on your charge.

Lvc@



>
> Regards,
> Gaurav
>
>
>
> On Wednesday, March 19, 2014 11:15:16 AM UTC+5:30, Lvc@ wrote:
>
>> Hi Guarav,
>> you've a bidirectional relationship, so the easiest way is using Graph
>> API.
>>
>> Lvc@
>>
>>
>>
>>  On 19 March 2014 06:43, Gaurav Dhiman <[email protected]> wrote:
>>
>>>
>>>
>>> On Friday, March 7, 2014 5:24:18 PM UTC+5:30, Andrey Lomakin wrote:
>>>
>>>> Hi,
>>>> You do not need to insert them as separate insertions.
>>>> Just create all objects at once and store root document everything will
>>>> be stored and links will be updated automatically.
>>>>
>>>>
>>> Hi Andrey,
>>>
>>> Can you explain above statements more with an example ?
>>>
>>> Lets say, there are three classes:
>>> Person, Emails, Phones
>>>
>>> with below two way linking in Document based DB
>>> Person (1) <----> Emails (N)
>>> Person (1) <----> Phones (N)
>>>
>>> Person.emails is linkset to records in Emails class
>>> Emails.person is link to record in Person class
>>>
>>> Person.phones is linkset to records in Phones class
>>> Phones.person is link to record in Person class
>>>
>>>
>>> Given above situation, what is the best way to insert these documents
>>> with all inter-linking done. Performance and consistency are both important
>>> to consider.
>>>
>>> I will appreciate if you can give one example code.
>>>
>>> Regards,
>>> Gaurav
>>>
>>> --
>>>
>>> ---
>>> 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.
>>>
>>
>>  --
>
> ---
> 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.
>

-- 

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