Suresh
Suresh

Reputation: 39541

DSE Graph Database "Is" relation representation in groovy

enter image description here

I am having difficulty, in understanding this Graph. I understand that

Org and Persons are vertices and 'has vendor','Has Customer' and 'Has Employee' are the Edges, but i am not able to understand what is meant by "isMerchant" here in the picture attached

the name is quite intuitive, the Org is of Type Merchant,

but how can i represent the same in Groovy ?

something thing like this for edge

 schema.edgeLabel('Has Vendor').connection('Org',
 'Person').ifNotExists().create()

Upvotes: 1

Views: 92

Answers (1)

jlacefie
jlacefie

Reputation: 614

What is the link for this diagram? Based on the proximity of Merchant to Org and the colors used to denote some "meaning", it appears as if Merchant may be a Property of Org. If that's the case, then simply creating a property for Merchant and adding it to the Org vertex will provide the desired results.

If Merchant is a separate Vertex, then creating an "Is Merchant" edge like what you've described will provide the desired results.

Gremlin's DDL is used to create schema for DSE Graph - http://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/using/createSchemaStudio.html

Upvotes: 1

Related Questions