I am trying to model data for OrientDB. I am new to graph-database. I got doubt during modeling (paradigm change from RDBMS to GraphData).
How model tertiary (3-way i.e. between 3-vertex) relationship in Graph database (OrientDB)? An example is as below:
- Customer A introduces Customer B to Bank C.
- Employee A has referred Employee B and Employee C in Company D.
- Fiend A introduces Friend B to friend C.
- Person A is Granter of the Loan account of Person B in Mortgage company C.
- Person A & B has purchased policy type 'Life-Insurance' of Insurance Company 'MetLife' from Agent C.
Currently, I am using a vertex in between (like Introduction-Process) and edges to all related vertex
('IntroducedBy'-edge between 'Customer A' and 'Inroduction-Process'; 'IntroducedTo'-edge between 'Customer B' and 'Inroduction-Process' and 'IntroducedFor'-edge between 'Bank C' and 'Inroduction-Process').
Is it correct or is there any other option?
How to represent a enumeration value? As for example Customer-account-type. Currently I have created a class of AccountType and has fixed number of vertex (same as of Enum values) and create a link from Account to AccountType. Is there any better option to model the Enumeration in Graph-database?
Thanks in advance.