I thought of creating structures for both relationship types and entity types and then to include two pointers in relationship types structure, where entity types can be linked (e.g.: left right)
But I'm not sure whether this will lead to a successful data structure.