cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Modeling issue

OmarHamdy
Node Clone

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

2 REPLIES 2

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/modelin...

Elaine

 

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.