Data structures for tracing back and forward of products