How to design a graph database in this scenario?
0
votes
1
answer
382
views
here is my scenario. I have a **pre-defined data type structure** for books. Just take it as an example for the sake of simplicity. The structure looks like the image below. It's a Labeled Property Graph and the information is self-explained. **This data type structure is fixed**, I cannot change it. I just use it.
When there is 1 book, let's call it *Harry Potter*, in the system, it might look like below:
So, the book has its own property (ID, Name,...) and also contains a field type
In this case, there is another book called *Graph DB*, with those information as highlighted.
The problem of this design is: **we don't know which information belong to which book**. For example, we cannot distinguish the


MandatoryData
. By looking at this graph, we can know all information about the book.
The problem happens when I have 2 books in the system, which looks like this:

publishedYear
anymore.
My question is: how to solve or avoid this problem? Should I create 1 MandatoryData
for each book? Could you propose me any design?
I'm using Neo4j and Cypher. Thank you for your help!
Asked by Triet Doan
(173 rep)
Nov 22, 2017, 02:55 PM
Last activity: Aug 22, 2019, 01:35 AM
Last activity: Aug 22, 2019, 01:35 AM