Well, you suggest a very complex solution in my use case !!!
I have a large excel table, full of empty values
The primary key could be the Codice
column, or the concatenation of the Cognome,Nome,Data di Nascita
Also, the Luogo di nascita/birth place/col 3
is not mandatory, and the Stato/Country /col 4
is mandatory only for foreign birth places.
Via/Street, Cap/Zip code, City
is the address, (all the field combinations are optional!)
There should be a cellulare/mobile phone
AND/OR an email
Finally, there should be some annotations.
The cherry on the cake is the label: this is a Person
and is also a Patient
, so the label should be Person:Patient
, but there should be also doctors, and the label should then be Person:Doctor
or Person:Patient:Doctor
in the case the doctor is also a patient (but the Person properties and basic relationships remains the same!)
As you can see, this simple example explain a very basic situation that is completely different with respect to the one you suggested.
Maybe a conditional statement into the query would solve everything, but an if statement is not available.
And this is why I generated the old very long query: each fragment was slightly different by the other, creating nodes with only the defined properties for that node.
How can we go out of this knot?