Hi there, m new at orient db trying to figure out something about relations
,
In this code Line => create edge owns from (select from Person where name =
'Matt') to (select from Car where model = 'Ferrari')
We have edge between record to record. Its fine for few records. But what
will happen if i ve millions of data ? Should i create edge from backend
for every new record?
Or can i just link the Property Fields like => create edge owns from
Person.Name to Car.model ??
I want to know that is there any possible way for relation database like
MSSQL , you know in ms sql , we can create PK and FK between Fields , with
that way we do not need to create relations for every new record.
Here another question -> select car.model person.name from car, person
Where .............................. I think i can not use 2 different
class after FROM m i right ?
27 Mart 2014 Perşembe 17:03:33 UTC+3 tarihinde Andrey Lomakin yazdı:
>
> Hi,
> Could you try
>
> select name from Person where gender = 'M' and out('owns')[0].model =
> "Ferrari" and out('likes')[0].mov_name = "Need For Speed"
>
>
> On Thu, Mar 27, 2014 at 5:13 AM, Joel Mathew <[email protected]
> <javascript:>> wrote:
>
>> Hi group,
>> I have below schema with three classes
>>
>> orientdb {demo1}> select from Person
>> ----+-----+-----+------+--------+---------
>> # |@RID |name |gender|out_owns|out_likes
>> ----+-----+-----+------+--------+---------
>> 0 |#11:0|Matt |M |#12:0 |#13:0
>> 1 |#11:1|Helen|F |#12:1 |#13:1
>> ----+-----+-----+------+--------+---------
>>
>> orientdb {demo1}> select from Car
>> ----+-----+-------+-------
>> # |@RID |model |in_owns
>> ----+-----+-------+-------
>> 0 |#12:0|Ferrari|#11:0
>> 1 |#12:1|BMW |#11:1
>> ----+-----+-------+-------
>>
>> orientdb {demo1}> select from Movie
>> ----+-----+--------------+--------
>> # |@RID |mov_name |in_likes
>> ----+-----+--------------+--------
>> 0 |#13:0|Need For Speed|#11:0
>> 1 |#13:1|Matrix |#11:1
>> ----+-----+--------------+--------
>>
>> Person(name,gender)
>> Car(model)
>> Movie(mov_name)
>> Person > owns > Car
>> Person > likes > Movie
>>
>> I'm looking at a query which matches values across three classes across
>> the edges
>> Find Person.name where Person.gender='M' and who owns Car.model='Ferrari'
>> and who likes Movie.mov_name='Need For Speed'
>>
>> One way to achieve the same with gremlin is
>> g.V('@class','Car').has('model','Ferrari').in('owns').has('@class','Person').has('gender','M').as('x').out('likes').has('@class','Movie').has('mov_name','Need
>>
>> For Speed').select(["x"])
>> I'm using OrientDB 1.7-rc2-SNAPSHOT..
>> Please help me with some pointers towards equivalent orientdb sql.
>>
>> Thanks,
>> Mathew
>>
>>
>> --
>>
>> ---
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Best regards,
> Andrey Lomakin.
>
> 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.