My queries for "Tag" : one for inserting tag and some queries to retrieve them knowing that every tag has one type of alarm so i expected two possibilities :
make every tag has all alarms properties "Digital input" Tag properties like "state0" and "state1" and "Analog input" Tag properties like "Alarm LL Value" , "Alarm L Value" , "Alarm H Value" and "Alarm HH Value"
Make alarm node for every type : Tag-[:HAS_DIGITAL_ALARM]->:Digital_alarm Tag-[:HAS_ANALOG_ALARM]->:Analog_alarm
every alarm node type with its own properties but the problem will be that i don't have Unique id for every alarm because every node is just about some readings
I am confused with your use case. Do you have a bunch of sensors reporting measurements you are trying to track? What does a 'tag' represent, as specific sensor? Is an 'alarm' a measurement, or is an alarm raised under some condition? What kind of information do you want to retrieve from the graph?
If a tag represents some sensor or hardware, then you should be able to assign some unique ID to it, such as asset number, serial number, etc. Can you use a data model as illustrated in the screenshot? Each tag (piece of hardware) emits sensor readings or alarms if a threshold is reached. Either way, you can capture these events in an 'Alarm' or "Measurement" node, which is linked to the sensor/hardware that generated the data/alarm. Each node has two labels, one representing its generic type, such as Tag or Alarm, and one representing the type, such as Digital or Analog.