1

I'm trying to model the following relationships between entities of type Product, Item and Part.

Model

A product consists of one Item and the item itself contains two or more parts. In my domain the sort order of the parts matter per product. So I need to create a model which allows easy querying of parts starting from a product.

The challenge I'm facing is where to place the information on how the parts are sorted depending on the product they belong to. That means in case of Product A the item has Part 1 and Part 2, in case of Product B the item has Part 2 and 1. The entities stay the same but the sort order of the items is different per Product.

What is the recommended way to design this in a graphDB?

cybersam
  • 63,203
  • 6
  • 53
  • 76
swinkler
  • 23
  • 1
  • 4
  • Can you explain what do you mean by "how the parts are ordered depending on the product they belong to"? – cybersam Apr 15 '19 at 20:17
  • I elaborated on that and put an example. Hopefully it's clearer now. – swinkler Apr 15 '19 at 20:59
  • Do you just want to do either an ascending or descending sort, or do you require a more complex mechanism? – cybersam May 03 '19 at 18:24
  • I think that somewhere a property needs to be placed which holds the sort order of the Parts. Alphabetical or numeric sorting would not be sufficient. – swinkler May 06 '19 at 12:33
  • What kind of sort do you want to do, exactly? – cybersam May 06 '19 at 17:41
  • I want to do a numerical sort based on a property. Let's call it 'sortOrder'. In case of Product A I want Part 1 to have sortOrder=1 and Part 2 sortOrder=2. In case of Product B the other way round. – swinkler May 06 '19 at 20:43

0 Answers0