I am building a master database to store all relevant information about our customers. I am using Neo4j.
Below is a sample of our model. We have Person
, that can be registered in 3 of our mobile applications. (App.01
, App. 02
, App. 03
- We use CPF key, it is like a SSN). In those apps the user can be registered with an email. So it is represented by Email
entity. Those user can have multiple address represented by Address
entity.
The question is: As I am building a Master Data, IMO, if someone query the mdm database asking for all "best" information about a person, I would return for example: Name: John Best email: email2 (because it has two apps using it) Best address: addr1 (because it has tow apps using it)
So I am going to build some heuristis to define what is the "best" email and address.
For this purpose, I have some options:
I could create an edge from
John
toemail2
and toaddr1
. So it's going to be easy for an user of MDM to get the "best" address/email from John.I could build a rest API endpoint and create this heuristic in query time.
Does anyone have experience using graph database or design MDM database? Is it a good approach?
This question is a complement for the question: Using Neo4j to build a Master Data Management