added separate tables for product and material transactions

* made post proces more robust by creating compositions and products tables if
  they don't exist