Too Long; Didn't Read
Alberto Cuesta Cañada explains how to use smart contracts to report on transaction history. He says that data in a public blockchain is public, and that it should be used as a database table. Cuesta says that smart contracts should not be written as database tables. He also explains how smart contracts can be used to store data that is not going to be used by a smart contract, and how to make your smart contracts public without noticing that you might be making data public without knowing what it is.