Modeling issue

I have an issue with modeling in my business

tag has two types of alarms : state and analog alarm

the tag must have one alarm : state or analog alarm

knowing that i don't have any unique property about alarm , how can it be modelled ?

the logic in the screenshot

The model in your screenshot does not give you the ability to know which type of alarm a tag is related to. You could use something like shown the screenshot below. Here you have Alarm nodes that also have second label indicating what type of alarm they are. A Tag is then related to one type.

Screen Shot 2022-08-16 at 9.35.13 AM.png

If you don't want two labels, then you could have Alarm nodes and specify the type as a property.

There is no constraint that you can require one property OR another.

You can place an existence constraint on a single property. Perhaps the value of this property can indicate the type of alarm?

I suggest that you post modeling questions here:

https://community.neo4j.com/t5/forums/filteredbylabelpage/board-id/graph_platform/label-name/modeling

Elaine