Very nice. Graph following for the win. I wrote an inventory control system about 10 years ago that achieved this in a very hacky (read code outside SQLite) way. The requirement was to be able to track items, track users of items, track how much time an individual user had used and item, and to track maintenance and repairs of items. The would let you "charge back" wear and tear on things to the most responsible party, and to provide lifetime information in order to buy replacements in a timely way. All that hackyness would be a single statement with this change.