I had a requirement to implement dynamic hierarchy in a project. One possible solution was to use a Graph database NoSQL solution like Neo4j. What I designed in a graph implementation in RDBMS. In this solution I designed a table has a Many To Many relationship with itself. An example of this is given here. I have a table (TABLE_A) that defines different entities and another table TABLE_B that defines type of the entities, and TABLE_B has a many to many relation with it self that defines relation between different entity types. This is store in a JoinTable, TABLE_C. Similarly TABLE_A has a many to many relationship with itself to define instances of different relations defined in TABLE_C. In Java I have used only two classes to implement this structure.
Now this many to many relationship in my case is not a always a many to many relationship. Sometimes it's a one to many and at time a one to one.
Firstly, is a No SQL Graph DB more suited to my requirement than a Relational DB since the data that I'm planning to test will be in the order of Hundred Thousand records.
Secondly, If RDBMS solution is better then is there a way to include a property in the join table TABLE_C that defines the multiplicity of the relation i.e. whether it's a one to many or a many to many or a one to one relation?