I have a datastructure that involves rating items, much like Netflix do. Now those ratings are numbers that are attached to relations between objects in a graph database. However, it seems as if attaching properties to relations, not nodes, in UML seems to be a difficult thing to find to do.
To elucidate. Object A rates Object B with a score of 8. So there are two objects that are connected by a relation called "rating" which has a value of 8 on it. Now, I would rather not create a relation for each value (A and B are related by rating score 8) -- this seems like a bad way of doing things. If someone could point me to how to represent this that would be brilliant.
Thanks
-
1You might consider an Association Class, which is both an association with end points, and a class so it can have members.Erik Eidt– Erik Eidt05/29/2019 23:20:06Commented May 29, 2019 at 23:20
-
@ErikEidt, you should add a bit more details and make it an answer. I don't want to take your credits so I will wait for you to do so rather than answering myself.Ister– Ister05/30/2019 06:18:09Commented May 30, 2019 at 6:18
1 Answer 1
It is an association class. Consider it as a class „C" that
- links between A and B
- has properties, such as the Rating score
You could implement it, for example, by referencing from C to both A and B (and vice versa),