as serious in this graph orientdb mysql query

67 views
Skip to first unread message

Renzo Ludeña

unread,
Jan 28, 2016, 12:01:44 PM1/28/16
to OrientDB

Greetings friends, I come from the world of relational database'm understanding the basis of graph data using orientdb, I have several doubts about how serious consultations. I have 2 classes Bussines hasBussinessLocation edge connected to a class BusinessLocation attached to the image of the 2 classes with your information and I want to see how it would make consultations graph








as serious in this graph orientdb mysql query

select a.title, a.content, b.address, b.tags
from Bussines
BusinessLocation inner join on a.id = b.idBusiness
Where a.title like '% text%'
a.content or LIKE '% text%'
b.address or LIKE '% text%'
or contains tags ('text')


thank you for your help



user.w...@gmail.com

unread,
Jan 29, 2016, 12:53:15 AM1/29/16
to OrientDB
Hi Renzo,

Try this query:

SELECT in('hasBusinessLocation').title as title,in('hasBusinessLocation').content as content,address,tags
FROM BusinessLocation
WHERE (address like '%TEXT%') or (tags contains '%TEXT%') or (in('hasBusinessLocation').title like '%TEXT%') or (in('hasBusinessLocation').content like '%TEXT%')

Hope it helps.

Regards

Michela

Renzo Ludeña

unread,
Jan 29, 2016, 10:28:36 AM1/29/16
to OrientDB

Thanks for responding friend thought that way do I have another solution that you think

select @rid, address,state, tags, title, content
from
(
select @rid, address,state, tags,in('hasBussinessLocation').title[0] as title, in('hasBussinessLocation').content[0] as content from BussinessLocation
)
WHERE (address like '%TEXT%') 
or (tags contains '%TEXT%') 
or (title like '%TEXT%')
or (content like '%TEXT%')



think is the best way, thanks



Reply all
Reply to author
Forward
0 new messages