how can i encode relationships that are not binary (node -- relation --- node) using labeled property graphs ? for example consider cases where a relationship becomes true/activated when more than 1 relationship is present. For example a dish is macaroni and cheese only if it has all 3 ingredients as shown in the figure. What's the best practice in encoding such data in a LPG ?
Amir--Two points. (1) I can't speak for property graphs, specifically, but I believe there is value in their flexibility. Speaking more generally...encoding relationships of greater arity than 2 is a common obstacle in knowledge modeling (broadly construed). Consider, for example, formalisms outside of property graphs: formalisms like owl are limited to binary relationships. Now consider other formalisms such as Common Logic which can handle more than binary, but in so doing is more complexity (not bad in itself, but the tooling is needed). (2) Also consider your logic. If you're assuming typical predicate logic, then "only if" typically introduces the consequent, and is thereby a necessary condition. Ask yourself if that is what you want, or if necessary and sufficient conditions are what you want, or something else. (3) In your model...are you sure that you want 'Food' in there? Is Food an ingredient? Is 'Macaroni & Cheese' also Food? What is your intended meaning of 'Food' and 'ingredient'? Food for thought...no pun intended. {Actively open to formal collaborations, to employment, and to Phd study options. Hire for consulting, curation, misc. https://tinyurl.com/yas7trzy https://tinyurl.com/y65z6c8h https://ontospace.wordpress.com/services/]
You can represent the "relation” as a “node” (using your terminology). Then, the “relations” from that relation-node can, for example, be interpreted as “roles” in the relationship-as-node.
Donny was likely referring to what a blank-node is often used as in RDF/OWL modeling.