Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-03-2021 02:43 AM
So I am about to create a new connection between Store
and Products
.
The 'connection' is many to many.
Now, this connection also contains other info such as startDate
and endDate
.
My connection is whether it's better to just create a relationship or if I need to create a middle node.
For example
Version 1
(store)-[:PROMOTES {startDate:...., endDate:...})->(product)
Version 2
(store)-[:PROMOTES)->(promotion:Promotion {startDate:...., endDate:...})<-[:PROMOTED]-(product)
Some info:
promotion
via the product
, the dates
will be used to fetch other promotions
of that store
during the dates
foundpromotions
i.e. promotions where startDate<today()<endDate will be often fetchedHope I make sense.
Thanks
09-03-2021 06:41 AM
How you have it works well.
Switch to a node if:
Small amount of promotions between store and product, how you have it is fine.
As it grows you'll want an intermediary in my opinion.
Hope that helps (and this formatted correctly despite the preview pane).
-Mike
09-03-2021 10:30 AM
Check this article:
All the sessions of the conference are now available online